Dynamic Arrays and Modern Functions

Learn how one Excel formula can return a whole list that resizes itself. Filter rows with FILTER, sort them with SORTBY, generate numbers and dates with SEQUENCE, and combine these functions into live reports that update when the data or a choice changes. Then make long formulas shorter and clearer with LET, turn repeated calculations into your own functions with LAMBDA, and learn how these formulas behave in older Excel versions and in Google Sheets.

IntermediateLesson 6 of 7 in Spreadsheet Formulas and Functions Course

What you will learn

  1. Explain how one formula can return a whole list of results into neighboring cells, refer to that list with the spill range operator, and prevent or fix #SPILL! errors.
    • Read how a formula spills into neighboring cells
      Recognize formulas that return several values, find the anchor cell and the spill range, and predict where and how far a result spills.
    • Refer to a spilled list with the # operator
      Use the spill range operator to point other formulas at a whole spilled result, at any size, and pick single columns from it.
    • Prevent and fix #SPILL! errors
      Read the reason behind a #SPILL! error, clear what blocks the result, and place spilling formulas where they have room to grow.
  2. Build lists that show only the rows meeting one or more conditions and update themselves when the data or the criteria change.
    • Return the rows that meet one condition
      Write FILTER formulas with one condition, drive them from a criteria cell, choose the columns returned, and handle results with no matches.
    • Combine several conditions in one filter
      Join conditions with AND and OR logic, match part of a text or a list of values, and let an empty criterion cell show every row.
  3. Sort lists by one or more keys with SORTBY, including keys that are not shown, and create numbered lists, date series and grids with SEQUENCE.
    • Sort a list by one or more columns with SORTBY
      Sort rows by separate key ranges, in ascending or descending order, with tie-breaking keys, calculated keys and custom orders.
    • Generate numbers and dates with SEQUENCE
      Create number series, countdowns, date lists and grids with SEQUENCE and size them from other results.
  4. Nest dynamic-array functions so one formula filters, sorts, trims and summarizes data, and lay out reports that update when the data or a choice changes.
    • Nest FILTER, SORTBY and other functions in one formula
      Use one dynamic array as the input of another, sort filtered results with matching keys, and summarize filtered lists.
    • Return top results and chosen columns
      Keep the first or last rows of a sorted result, choose and reorder columns, stack results with headings, and use INDEX with SEQUENCE where the newer functions are missing.
    • Lay out a live report on a worksheet
      Combine a data table, input cells, drop-down lists, headings, totals and spilling formulas into a report that stays correct as data grow.
  5. Name the steps of a long formula with LET so it is shorter, faster and easier to check, and turn repeated calculations into custom functions with LAMBDA.
    • Name values inside a formula with LET
      Write LET formulas that assign names to values and expressions, follow the rules for names, and check the steps one at a time.
    • Rewrite a long dynamic-array formula with LET
      Find repeated parts of a nested formula, replace them with names, and keep the result identical while the formula gets shorter and clearer.
    • Write and test a LAMBDA function
      Define a custom calculation with parameters, test it in a cell with sample inputs, and know how LAMBDA works with ranges, LET and helper functions.
    • Save a LAMBDA as a named function and reuse it
      Store a tested LAMBDA under a name in Name Manager, call it like a built-in function across the workbook, and maintain it in one place.
  6. Know which Excel versions run each function, recognize how older versions and Google Sheets treat these formulas, and adapt a workbook before sharing it.
    • Check which Excel versions support each function
      Match each function to the versions that have it, read legacy array formulas and the @ operator, and prepare workbooks for users of older versions.
    • Adapt dynamic-array formulas for Google Sheets
      Recognize where Google Sheets handles arrays differently and rewrite FILTER, SORTBY and spill references so they work there.

Dynamic Arrays study guide

6 chapters

1

Let one formula fill a range

A formula can return a whole column or grid, with Excel placing each value in its own cell. Understanding where that result starts, how it changes size, and what can block it makes the later filtering and reporting formulas much easier to build. You will follow a spill from its anchor, connect other calculations to its current size, and use the error message to find the right fix when the result cannot appear.

1.1 One formula, many cells

A dynamic array formula can return several values. Excel places them in neighboring cells, starting where you entered the formula and continuing below or to the right. This is called spilling. The result occupies a rectangular spill range.

Find the formula's home

The top-left cell is the anchor. It contains the formula and the first result. Click any result cell to see a thin border around the spill range. In cells other than the anchor, the formula bar shows a grayed-out copy of the formula. Edit the anchor to change the whole result.

Enter =A2:A9 in G2. Eight source cells produce eight results in G2:G9. Entering =SEQUENCE(5) produces five numbers down a column. A range calculation also spills: =D2:D9*1.1 returns eight amounts, each multiplied by 1.1.

Multiply matching rows

Suppose B2:B6 contains quantities and C2:C6 contains unit prices. Enter =B2:B6*C2:C6 once in D2.

  1. Excel pairs B2 with C2, B3 with C3, and so on.
  2. Each pair produces one line total.
  3. The five totals fill D2:D6. A quantity of 4 at a price of 2.5 gives 10 in that row.

Do not copy this formula down. A copy in D3 would occupy a cell the first formula needs, causing a #SPILL! error. A single spilling formula keeps the calculation the same across all five rows.

Predict the shape

Two equally sized columns combine position by position. A single number is reused at every position, as with the multiplier 1.1. Excel can also repeat a single row across rows, or a single column across columns. For example, =SEQUENCE(3)*SEQUENCE(1,4) combines the column 1, 2, 3 with the row 1, 2, 3, 4. The result is a 3-by-4 multiplication grid: its final row is 3, 6, 9, 12.

Arrays with incompatible lengths do not simply stop at the shorter array. A five-row column multiplied by a three-row column gives #N/A in positions with no partner. Check both the height and width of the inputs when a result's shape is unexpected.

Leave room for change

A spill follows the size of the formula's result. If a source change makes a FILTER return six rows instead of four, Excel expands the spill at the next calculation. If fewer rows qualify, it shrinks. A fixed source reference such as A2:A9 still reads only those cells; automatic output resizing does not make that source reference grow.

Formatting stays with worksheet cells. A list of dates that expands into unformatted cells can show day numbers there. March 2, 2026, is stored as 46083 in Excel's standard 1900 date system. Apply a date format to the area the list can reach, including future rows. Spilling is available in Microsoft 365, Excel 2021, Excel 2024, Excel for the web, and the Excel mobile apps.

Key Takeaways

  • The anchor is the top-left cell and the only cell where you edit the spilling formula.
  • A range reference or a calculation on ranges can spill, as well as an array-returning function.
  • Array calculations pair positions and can expand a single row or column across another array.
  • Enter a spilling formula once and leave its output area free.
  • The result resizes; cell formatting and fixed source references do not resize with it.

1.2 Follow a list with the spill operator

A result that changes size needs a reference that changes with it. The spill range operator, #, means the whole current spill starting at the address immediately before it.

Start from the anchor

With =SEQUENCE(10) in A2, the numbers 1 through 10 fill A2:A11. The reference A2# means that entire block. In another clear area, =SUM(A2#) returns 55.

Now change the anchor formula to =SEQUENCE(20). The result grows to A2:A21, and the same SUM returns 210. A fixed reference to A2:A11 would still add only the first ten cells. A fixed range can also include cells no longer occupied after a spill shrinks.

Write the operator after the cell address: A2#. The address identifies the formula that produces the list; the operator asks Excel for that formula's complete current output. For a spill on another sheet, the anchor still determines which list the reference follows.

Measure a two-dimensional result

Suppose G2 contains =FILTER(A2:D9,B2:B9="North"). The result has three rows and four columns.

  • =ROWS(G2#) returns 3.
  • =COLUMNS(G2#) returns 4.
  • Entering =G2# in another empty area reproduces all three rows and four columns.

The operator refers to the whole rectangle, not just the first column. This matters when you need an amount total from a report that also contains names, regions, and products.

Pick a column with INDEX

INDEX can return an entire column when its row argument is 0. The fourth column of this report holds amounts, so use:

=INDEX(G2#,0,4)

It returns 420, 650, and 275 as a column. To add those amounts without displaying a separate column, put the expression inside SUM:

=SUM(INDEX(G2#,0,4))

The total is 1345. The 4 counts columns within the spill, starting with its leftmost column. It does not mean worksheet column D. If you later change the report to return different columns, check that this position still identifies the amounts.

Recognize reference errors

A # reference must name an anchor. If G3 is just the second row of the G2 spill, G3# returns #REF!. An ordinary value in B2 also cannot be addressed as B2#. Click inside a spill, find its top-left cell, and use that address. When selecting a whole spill while building a formula, Excel can enter the spill reference for you.

Spill references work with functions that accept the resulting input; they do not remove a function's own shape or input rules. A single-column requirement still needs a single column, which INDEX can supply.

A spill reference to another workbook needs that source workbook to be open. If it is closed, the linked formula returns #REF! when refreshed. Reopen the source to restore the live link, or share a separate copy of the results as values when a live connection is unnecessary.

Key Takeaways

  • Write # after the anchor address to follow the entire current spill.
  • Use ROWS and COLUMNS to measure the result; use INDEX with row 0 to select a whole column.
  • A # reference to a non-anchor returns #REF!.
  • Cross-workbook spill links need the source workbook to be open.

1.3 Make space for a spilling result

#SPILL! means Excel cannot place a formula's array result on the sheet. The source data stay unchanged. Select the anchor and open the error indicator to see the reason before changing the formula.

Find an occupied cell

A value, a formula, or even a typed space can block the intended output. The error menu's Select Obstructing Cells command helps locate these cells. Move useful content elsewhere or clear it, and the result can appear.

For example, the North filter in G2 needs G2:J4 for three rows of four columns. A note in J3 blocks the whole result, including otherwise empty cells. Clearing J3 frees the spill. If another North order is later added to the source table, the result needs G2:J5. Leaving only today's output area clear is not enough for a growing report.

Formatting alone does not block a spill. A cell containing ="" looks empty but contains a formula, so it does block one. Inspect the formula bar when an apparently blank cell is in the way.

Check the worksheet layout
CauseWhat to change
Formula entered inside an Excel tableMove the output formula to an ordinary range, or convert the table to a range.
Merged cells in the output areaUnmerge them or move the anchor.
Output would cross the sheet edgeReduce the result size or move the anchor.
Another growing list occupies the areaGive the lists separate columns with room below.

An Excel table can supply the data. It cannot contain a spilling output formula in a calculated column. Keep those two roles separate when laying out a report.

Avoid asking for an entire sheet column of results

Excel has 1,048,576 rows. A formula such as =XLOOKUP(A:A,K2:K20,L2:L20) asks for a lookup for every cell in A:A. Entered below row 1, that many results would run beyond the last row. Use the actual lookup-value range or a table column to request only the required results.

The same edge rule applies horizontally: a wide array must fit before the last worksheet column. Moving a formula cannot make an array larger than the worksheet fit.

Keep the output size stable during calculation

=SEQUENCE(RANDBETWEEN(1,10)) makes the number of output rows depend on a random value. Excel may calculate again while resolving the sheet. If the size keeps changing between those passes and never settles, it returns #SPILL!. Use a stable row count, such as a number entered in an input cell. TODAY is volatile too, but it does not generate a new random size on each calculation pass.

Distinguish a blocked result from an empty one

A FILTER with no matching rows and no if_empty argument returns #CALC!. Clearing output cells will not create a match. Set an appropriate empty-result message or change the criterion. For #SPILL!, make room for the result that Excel is trying to place.

Put report totals above a growing list or beside it. A total directly beneath the current last row will become an obstruction when one more row qualifies.

Key Takeaways

  • Read the #SPILL! reason in the anchor before choosing a fix.
  • Values, formulas, spaces, and merged cells can obstruct output; formatting alone does not.
  • Keep spilling formulas outside Excel tables, even when their sources are tables.
  • Use bounded data references and leave room below and to the right.
  • An unsettled random output size can cause #SPILL!.
  • FILTER with no matches needs empty-result handling, not more worksheet space.
2

Build lists with FILTER

A useful report often starts with a question: which rows belong in this list? FILTER answers it with one test for each source row, then returns the rows that pass. You will first connect a single condition to an input cell, then build conditions for several requirements, alternative choices, dates, and partial text. Keeping those tests lined up with the source is the key to a list that updates correctly when the data change.

2.1 Choose the rows and columns to return

FILTER returns a live copy of the data that meet a condition. Its syntax is =FILTER(array,include,[if_empty]): array is what to return, include decides what to keep, and the optional if_empty gives a result when nothing matches.

Set up the orders example

Enter these headings in A1:D1 and the eight orders in A2:D9.

RepRegionProductAmount
AnaNorthPaper420
BenSouthInk180
ChenNorthInk650
DaraEastPaper300
EliSouthToner510
FayNorthToner275
GusEastInk390
HanaSouthPaper120

In G2, enter =FILTER(A2:D9,B2:B9="North"). The comparison tests all eight region cells. It produces TRUE for Ana, Chen, and Fay and FALSE for the other rows. FILTER returns those three rows, with all four columns, in G2:J4. Their original order is preserved; filtering does not sort them.

Let an input cell control the list

Type "South" in H1 and change the formula to =FILTER(A2:D9,B2:B9=H1). Ben, Eli, and Hana appear. Change H1 to "East" and Dara and Gus appear. There are no quotes around H1 because it is a reference. Quotes around "H1" would test for that literal text.

The result recalculates when the input or source values change. The worksheet's Filter button hides rows in the source and may need to be reapplied after changes; FILTER creates a separate formula result.

Compare numbers, dates, and text

=FILTER(A2:D9,D2:D9>=400) returns Ana, Chen, and Eli. Use > for strictly greater than, >= to include the boundary, and <> to exclude a value. Excel stores dates as numbers, so a date condition such as A2:A50>=DATE(2026,3,1) keeps dates on or after March 1, 2026, in a date-based data set.

Text equality ignores case: "north" matches "North". It does not interpret wildcards. A comparison to "ink" looks for that exact text; use SEARCH for a partial match.

Handle no matches and choose the output

=FILTER(A2:D9,B2:B9=H1,"No orders") shows "No orders" when the region has no matching row. Without that third argument, an empty result gives #CALC!. Using "" gives an empty-looking cell instead of a visible message.

Change only the first argument to return fewer columns: =FILTER(A2:A9,B2:B9="North") returns Ana, Chen, and Fay. The tested region column need not be part of the output, but its eight tests must still match the eight data rows. B2:B10 would create a length mismatch and #VALUE!.

To keep columns, give FILTER a horizontal test: =FILTER(A1:D9,A1:D1<>"Product") returns Rep, Region, and Amount, including headings. A row of four tests selects among four columns.

With the source converted to an Excel table named Orders, =FILTER(Orders,Orders[Region]="North") also includes new table rows. Enter the result formula outside the table.

Key Takeaways

  • FILTER keeps rows or columns according to a matching TRUE/FALSE array.
  • The array argument chooses what is returned; the include argument chooses what qualifies.
  • A criterion cell changes the list without editing the formula.
  • Use if_empty to replace FILTER’s no-match #CALC! error.
  • Structured references include new source-table rows.
  • Match the test length to the dimension being filtered.

2.2 Combine conditions row by row

Several requirements still need one keep-or-drop result for each row. In array arithmetic, TRUE acts as 1 and FALSE as 0. Multiplication gives AND; addition gives OR. Put each comparison in parentheses.

Require both conditions

=FILTER(A2:D9,(B2:B9="South")*(D2:D9>150))

The first test asks whether each order is South. The second asks whether its amount exceeds 150. Ben passes both tests, so his include value is 1. Hana passes the region test but fails the amount test, giving 0. Ben 180 and Eli 510 are returned.

The AND function is different: AND(B2:B9="South",D2:D9>150) combines all the tests into one TRUE or FALSE. It does not supply eight separate decisions to FILTER. Use multiplication for the row-by-row requirement.

Accept either condition

=FILTER(A2:D9,(C2:C9="Ink")+(C2:C9="Toner"))

A row passes when either test contributes 1, so Ben, Chen, Eli, Fay, and Gus appear. Overlap is allowed. In (B2:B9="North")+(D2:D9>500), Chen scores 2 because both tests pass. FILTER keeps any nonzero score and returns the row once, not twice. The full result is Ana, Chen, Eli, and Fay.

For "Ink or Toner, and above 300," group the alternatives first:

=FILTER(A2:D9,((C2:C9="Ink")+(C2:C9="Toner"))*(D2:D9>300))

Chen, Eli, and Gus qualify. Without the outer parentheses around the OR group, multiplication would apply to only part of the intended test.

Include an entire month

For dates or date-times in A2:A50, use (A2:A50>=DATE(2026,3,1))*(A2:A50<DATE(2026,4,1)). This includes March 1 and every time on March 31. A test ending at midnight on March 31 would miss entries later that day. The next month's first day gives a clear exclusive upper boundary.

Match part of text or a list of choices

SEARCH("ink",C2:C9) returns a character position where the text is found and #VALUE! where it is absent. ISNUMBER turns those outcomes into TRUE and FALSE. Thus =FILTER(A2:D9,ISNUMBER(SEARCH("ink",C2:C9))) keeps Ben, Chen, and Gus, ignoring case.

To allow several region names, type "North" and "East" in K2:K3. Use =FILTER(A2:D9,ISNUMBER(MATCH(B2:B9,K2:K3,0))). MATCH searches for each region in the allowed list; 0 requests an exact match. The output is Ana, Chen, Dara, Fay, and Gus.

Give a blank input a useful meaning

=FILTER(A2:D9,(B2:B9=H1)+(H1=""))

When H1 is empty, the second test is TRUE for the whole list, so every row passes. When it contains a region, that test becomes FALSE and only matching rows remain. To exclude East in a normal condition, use B2:B9<>"East". Add an if_empty message to displayed filters when no rows can qualify.

Key Takeaways

  • Use * for row-by-row AND and + for row-by-row OR.
  • FILTER keeps a row once whenever its include score is nonzero.
  • Parentheses control how mixed AND and OR conditions combine.
  • Use an inclusive start and exclusive next-period boundary for date-times.
  • ISNUMBER with SEARCH tests partial text; ISNUMBER with exact MATCH tests membership in a list.
  • An added blank-input test can make an empty criterion mean all rows.
3

Sort results and generate series

Sorting puts existing records in a useful order; generating a series creates values that were not listed before. SORTBY lets a separate column, a calculated key, or several priorities decide a result’s order. SEQUENCE creates numbered rows, spaced dates, and rectangular grids. Both return arrays, so you can use their results directly on the sheet or pass them into the report formulas you build next.

3.1 Keep records together while sorting

SORTBY returns a sorted copy of an array. The source stays in its original order. Its syntax is =SORTBY(array,by_array1,[sort_order1],[by_array2,sort_order2],…).

Choose the data and the key

For the orders in A2:D9, =SORTBY(A2:D9,D2:D9,-1) returns all four columns sorted by Amount, largest first. The order is Chen 650, Eli 510, Ana 420, Gus 390, Dara 300, Fay 275, Ben 180, and Hana 120. Each name moves with its region, product, and amount.

The sort key is D2:D9. A sort order of 1 means ascending and is the default. Use -1 for descending. Zero is not a valid sort order and returns #VALUE!.

Each key for a vertical list must be one column with the same height as the returned data. D2:D10 has nine values, so it cannot sort the eight rows of A2:D9. For sorting columns across a horizontal array, the key is one row with the same width as that array.

Return one field, sort by another

=SORTBY(A2:A9,D2:D9,-1) returns only the reps, from Chen through Hana. The amounts control the order but do not appear. This is useful for a list of names ranked by a score kept elsewhere. Key values are paired with data by their position, so their alignment must describe the same records.

Break ties with another key

=SORTBY(A2:D9,B2:B9,1,D2:D9,-1) sorts regions from A to Z, then sorts amounts from largest to smallest within each region:

  • East: Gus 390, Dara 300.
  • North: Chen 650, Ana 420, Fay 275.
  • South: Eli 510, Ben 180, Hana 120.

The second key decides only ties in the first key. A large South amount does not move ahead of an East record when Region is the first priority.

Calculate a sorting key

=SORTBY(A2:A9,LEN(A2:A9)) sorts by the number of characters in each name. The three-letter names come before Chen, Dara, and Hana. To impose a custom region order, put "North", "South", and "East" in K2:K4 and use =SORTBY(A2:D9,MATCH(B2:B9,K2:K4,0)). MATCH turns those labels into ranks 1, 2, and 3. Keep every region used by the data in the custom-order list so the keys have valid ranks.

Check the values' type

Ascending puts numbers from smallest to largest, text from A to Z without regard to case, and dates from oldest to newest. A number stored as text follows text sorting rules: "100" comes before "25". Convert numeric text to numbers before expecting numeric order.

FunctionHow it identifies a key
=SORT(A2:D9,4,-1)Column 4 within the returned array.
=SORTBY(A2:D9,D2:D9,-1)A separate range or array of values.

Inserting a column can change what SORT's fixed position 4 means. SORTBY's reference moves with its referenced column. Edit the source data or the anchor formula to change a sorted result; its spilled cells are output cells.

Key Takeaways

  • SORTBY returns a sorted copy and keeps all fields of each record together.
  • Use 1 for ascending and -1 for descending; key dimensions must match the data.
  • A key may be outside the returned data or calculated from it.
  • Later keys break ties in earlier keys.
  • Check number types and custom-order ranks when an order looks wrong.

3.2 Create number and date series

SEQUENCE generates a grid of numbers: =SEQUENCE(rows,[columns],[start],[step]). Rows controls the height, columns the width, start the first value, and step the change between consecutive values. Columns, start, and step default to 1.

Set the shape before the values

=SEQUENCE(5) creates a column containing 1 through 5. =SEQUENCE(1,5) creates one row of those values. If rows is omitted, supply another argument: =SEQUENCE(,5) also makes one row of five.

A grid fills row by row. =SEQUENCE(3,4) returns:

Column 1Column 2Column 3Column 4
1234
5678
9101112

For values running down columns first, generate the opposite shape and transpose it. =TRANSPOSE(SEQUENCE(4,3)) returns a 3-by-4 grid whose first column is 1, 2, 3. TRANSPOSE exchanges rows and columns.

Change the starting value and spacing

=SEQUENCE(1,4,10,5) starts at 10 and adds 5 each time, returning 10, 15, 20, 25. The fourth value follows three steps after the start.

A negative step counts down. =SEQUENCE(4,1,100,-25) gives 100, 75, 50, 25. A decimal step works too: =SEQUENCE(5,1,0,0.25) gives 0, 0.25, 0.5, 0.75, 1. A step of 0 repeats the starting number across the requested shape. Swapping the rows and columns arguments changes the direction of the output, not the step between values.

Generate dates from day numbers

Excel dates are stored as day numbers. =SEQUENCE(7,1,DATE(2026,3,2)) starts on Monday, March 2, 2026, and adds one day per row through Sunday, March 8. Apply a date format to the output cells. In the standard 1900 date system, the first value is 46083; formatting changes its display to a date without changing the underlying number.

To list five Mondays, use =SEQUENCE(5,1,DATE(2026,3,2),7). The dates are March 2, 9, 16, 23, and 30. For four whole Monday-to-Sunday weeks, =SEQUENCE(4,7,DATE(2026,3,2)) creates a calendar grid through March 29. A day-of-month format shows just the day in each cell.

Let formulas set the arguments

=DATE(2026,SEQUENCE(12),1) creates the first day of each month of 2026. SEQUENCE supplies month numbers 1 through 12, and DATE uses each one with the same year and day.

=SEQUENCE(ROWS(G2#)) creates row numbers beside a spilled list. A three-row list gets 1, 2, 3; a longer result gets more numbers. If G2 contains an empty-result message, ROWS counts its one message row too, so check for actual matches before using this numbering in a report.

For a user-controlled length, =SEQUENCE(B1) takes its row count from B1. Keep that count a positive whole number and give the output enough clear space. A shape argument controls how many cells are filled; a date or number format controls how their values look.

Key Takeaways

  • SEQUENCE sets rows, columns, start, and step, with the last three defaulting to 1.
  • A grid fills across each row before moving to the next row.
  • Negative, decimal, and zero steps create countdowns, fractional spacing, and repeated values.
  • Date series use numeric day steps and need date formatting.
  • Formula arguments can make a series follow another result’s size.
4

Turn array formulas into live reports

A report becomes easier to maintain when filtering, sorting, and selecting results form one clear calculation. The order of those steps matters: a top-results list must sort the relevant records before it cuts the list down. You will connect arrays without losing the match between rows and sort keys, choose the fields to display, and arrange tables, controls, headings, and totals so the output can grow.

4.1 Pass one array into the next function

A nested formula passes one function's result to another. Excel evaluates the inner calculation and gives its whole array to the next function. Only the final result needs space on the worksheet.

Filter the data and its sorting key together

To return North reps ranked by amount, start with =FILTER(A2:A9,B2:B9="North"). It returns Ana, Chen, and Fay. Their matching amounts come from =FILTER(D2:D9,B2:B9="North"): 420, 650, 275.

Combine those two arrays:

=SORTBY(FILTER(A2:A9,B2:B9="North"),FILTER(D2:D9,B2:B9="North"),-1)

SORTBY pairs the three names with those three amounts, sorts descending, and returns Chen, Ana, Fay. Passing the unfiltered D2:D9 as the key would pair three names with eight amounts and cause #VALUE!. The same number of rows is necessary, and the rows must also represent the same records in the same order.

Sort by a field already in the result

If you return all four columns, Amount is still column 4. =SORT(FILTER(A2:D9,B2:B9="North"),4,-1) is a shorter way to sort the North records. The result is Chen 650, Ana 420, Fay 275.

For a list already spilled in G2, use =SORTBY(G2#,INDEX(G2#,0,4),-1). INDEX extracts the fourth column from the very array being sorted, keeping the records aligned.

Reduce or condense a filtered list

An aggregate turns several values into one result. =SUM(FILTER(D2:D9,B2:B9="North")) adds 420, 650, and 275 to give 1345. =AVERAGE(FILTER(D2:D9,C2:C9="Ink")) averages 180, 650, and 390, giving about 406.67. =ROWS(FILTER(A2:D9,D2:D9>300)) counts four qualifying rows.

UNIQUE condenses repeated values. =UNIQUE(FILTER(C2:C9,D2:D9>300)) returns Paper, Ink, and Toner, in order of first appearance. =SORT(UNIQUE(B2:B9)) returns East, North, South as a sorted region list.

Match the empty result to the calculation

If FILTER finds nothing, a SUM wrapped around its #CALC! error also returns an error. Use a numeric fallback inside the filter: =SUM(FILTER(D2:D9,B2:B9=H1,0)). A region with no orders then totals 0. For a simple conditional total or count, SUMIFS or COUNTIFS can be clearer. FILTER is especially useful when the condition involves OR, partial text, or a list of allowed values.

A text message is a valid display result, but it is not a four-column data array. Do not pass "No orders" blindly into a sorting or column-selection step that expects four columns. Test whether any rows qualify before those steps.

Respect range-only arguments

Some functions accept calculated arrays; some arguments require worksheet ranges. SUM and SORTBY accept arrays directly. COUNTIF and SUMIFS require ranges for their range arguments. To use COUNTIF on calculated values, spill the list first, then refer to its cells, for example =COUNTIF(G2#,"Ink") for a single-column product list.

Build a nested formula from the inside out in a spare area. Check the filter's rows, then add the sort or aggregate. LET can give repeated steps names once the results are correct.

Key Takeaways

  • Nested formulas pass complete arrays from inner functions to outer functions.
  • Filter sort keys with the same condition as the returned data.
  • Use SORT with a column position when the key is already in the returned array.
  • Aggregates return one value; UNIQUE removes repeated values.
  • Choose numeric empty results for totals and guard array-processing steps from text messages.
  • Range-only arguments need actual worksheet cells, which a spill reference can supply.

4.2 Keep top rows and selected fields

A report often needs fewer rows and columns than the source. TAKE selects rows from an array, and CHOOSECOLS selects fields in the order you request. These functions, plus HSTACK and VSTACK, work in Microsoft 365 and Excel 2024.

Sort before cutting the list

=TAKE(SORTBY(A2:D9,D2:D9,-1),3) sorts every order by amount, then keeps the first three: Chen 650, Eli 510, and Ana 420. Reversing the steps would sort only the first three source records. Eli's larger order would never be considered.

The syntax is =TAKE(array,rows,[columns]). Positive rows keep records from the start. =TAKE(SORTBY(A2:D9,D2:D9,-1),-2) keeps the final two rows of the descending list, Ben 180 and Hana 120. It preserves their existing order. If you ask for five rows from a three-row list, TAKE returns all three.

A top-three list means three records. If amounts tie at the cut, it can include only one tied record. Add a meaningful second sort key to choose the order deliberately, or examine the next amount when deciding whether the report should include all tied records.

Choose and reorder columns

=CHOOSECOLS(FILTER(A2:D9,B2:B9="North"),1,4) returns only Rep and Amount: Ana 420, Chen 650, Fay 275. The syntax is =CHOOSECOLS(array,col_num1,[col_num2],…). Positions count within the supplied array, and their listed order is the output order. Asking for 4,1 would show Amount before Rep. Negative positions count from the right; -1 means the last column. Zero or a position beyond the array's width gives #VALUE!.

Build a region's top-two report

With "South" in H1:

=TAKE(CHOOSECOLS(SORTBY(FILTER(A2:D9,B2:B9=H1),FILTER(D2:D9,B2:B9=H1),-1),1,4),2)

Read outward from the innermost functions:

  1. FILTER keeps Ben, Eli, and Hana and their matching amounts.
  2. SORTBY puts Eli 510 before Ben 180 and Hana 120.
  3. CHOOSECOLS keeps names and amounts.
  4. TAKE keeps Eli and Ben.

For an input with no matches, guard the whole data-processing branch before running it, so an empty-result message does not become the array to sort or trim.

Add headings or ranks

VSTACK joins arrays vertically: =VSTACK(A1:D1,FILTER(A2:D9,B2:B9="North")) puts the headings above the North rows. HSTACK joins arrays horizontally: =HSTACK(SEQUENCE(3),TAKE(SORTBY(A2:A9,D2:D9,-1),3)) puts ranks 1, 2, 3 beside Chen, Eli, Ana. Match heights for side-by-side data and widths for stacked rows when you want a rectangle without padding errors.

Use INDEX in Excel 2021

Excel 2021 lacks these four selection and stacking functions. =INDEX(SORTBY(A2:D9,D2:D9,-1),SEQUENCE(3),{1,4}) returns the top three names and amounts. The vertical row numbers 1, 2, 3 combine with the horizontal column numbers 1 and 4. Unlike TAKE, requesting rows beyond the source result gives #REF!. Limit the row count to the available records, for example with MIN, when the list can be short.

Key Takeaways

  • Sort the full relevant list before using TAKE to select top results.
  • TAKE can select from either end and returns all available rows if asked for too many.
  • CHOOSECOLS selects fields by position and controls their output order.
  • HSTACK joins side by side; VSTACK joins top to bottom.
  • A record-count cut can split ties, so choose a deliberate tie rule.
  • Excel 2021 can select rows and columns with INDEX and SEQUENCE, but needs an explicit limit for short lists.

4.3 Arrange a report that can grow

A live report connects three parts: source data, input cells, and output formulas. New records or a different choice change the result at recalculation, without copying formulas or re-sorting a displayed list.

Give each part its own space

Convert the orders source to an Excel table named Orders. Its structured references grow with new rows. Orders[Region] means the table's region data; Orders[Amount] means its amounts. A fixed reference A2:D9 would miss a new order in row 10.

Keep H1 as the region input. Reserve G3:J3 for headings and G4 downward for the report. Put totals above the list or to its side. Use K2 downward for a one-column region-choice list: K is outside the four report columns G:J. Keep every output formula outside the source table.

Create a self-updating choice list

In K2, enter =SORT(UNIQUE(Orders[Region])). It returns East, North, South. Select H1 and choose Data > Data Validation. Set Allow to List and Source to =K2#.

The list source follows the helper spill. Adding a new region to the source table adds it to the choices. Data Validation supplies a convenient input; the report formula still reads H1 as an ordinary criterion cell.

Add headings and sorted rows

In G3, =Orders[#Headers] spills the four column headings across G3:J3. You can also type them. VSTACK can join headings and data in one formula where that function is available.

With North selected, this formula in G4 returns Chen 650, Ana 420, Fay 275:

=SORTBY(FILTER(Orders,Orders[Region]=H1),FILTER(Orders[Amount],Orders[Region]=H1),-1)

The data and key use the same region condition. For a report that also handles an unmatched choice, guard the sorting step:

=LET(keep,Orders[Region]=H1,IF(OR(keep),SORTBY(FILTER(Orders,keep),FILTER(Orders[Amount],keep),-1),"No orders"))

Here OR intentionally reduces the whole test array to one decision: does any order match? Only the matching case needs sorting. "No orders" appears as a single message when none match.

Show a total without blocking growth

Place =SUM(FILTER(Orders[Amount],Orders[Region]=H1,0)) above or beside the report. It returns 1345 for North and 0 for a region with no orders. A text display message and a numeric total need different empty-result behavior.

Do not put the total immediately under today's final record. Another qualifying row would need that cell and cause #SPILL!. For the same reason, avoid vertically stacking two independently growing reports in the same columns.

Prepare the display and check updates

Apply number formats and borders to the full area the list can reach. Newly occupied cells keep their own formats, so an expanding date column needs date formats ahead of time. Mark the result area so colleagues know to type in input cells or the source, not inside the spill.

Change H1 to East and check that Gus 390 appears before Dara 300 and the total becomes 690. Add a source-table row and confirm that the report and region choices include it when appropriate. To correct a displayed value, edit its source record; to change the report logic, edit the anchor.

Key Takeaways

  • A live report connects an expanding source table, clear input cells, and formulas outside the table.
  • Use a spill reference as the Data Validation list source for self-updating choices.
  • Provide headings explicitly and handle no-match messages before sorting.
  • Keep totals above or beside growing output, and format future output cells.
5

Name formula steps and reuse calculations

Long formulas become easier to read when their parts have useful names. LET names values within one calculation, while LAMBDA defines a calculation that can accept different inputs. You will check named steps, simplify a report without changing its answer, test a small function, and save it for use across a workbook. The goal is a formula whose rule is easy to find, test, and change when the work changes.

5.1 Give intermediate values local names

LET gives names to values inside one formula. Its pattern is =LET(name1,value1,[name2,value2,…],calculation). Supply at least one name-value pair and finish with the calculation to return. Up to 126 pairs are allowed.

Read the pairs from left to right

=LET(x,5,x+1) assigns 5 to x and returns 6. The name exists only inside this LET formula. Typing =x+1 in another cell will not reuse it unless x is separately defined there or as a workbook name.

A later pair can use earlier names. This makes a formula read like a short sequence of steps. It cannot use a name before that name has been defined.

Work through a commission calculation

A region earns 5% of its order total when that total exceeds 1000, and 3% otherwise. With the region in H1, use:

=LET(total,SUMIFS(D2:D9,B2:B9,H1),rate,IF(total>1000,0.05,0.03),total*rate)

  1. total adds amounts for the chosen region.
  2. rate checks that total and selects 0.05 or 0.03.
  3. The final expression multiplies the two named values.

North totals 1345. Its rate is 0.05 and commission is 67.25. South totals 810, so its rate is 0.03 and commission is 24.3. Exactly 1000 would use the lower rate because the condition is strictly greater than 1000.

Without LET, the SUMIFS expression would need to appear in both the rate test and the multiplication. A named expression is calculated once and can be reused, which can reduce repeated work in larger formulas. Names also give the numbers a meaning visible to anyone reading the calculation.

Choose valid, readable names

A LET name must start with a letter and obey Excel's naming rules. It cannot be a cell reference or reference notation. Names are not case-sensitive.

  • tax_rate and qtr_total describe values clearly.
  • q1, vat1, and tax2026 look like worksheet addresses and are invalid names. Excel's columns reach XFD, including TAX and VAT.
  • The single letters c and r conflict with R1C1 reference notation.
  • sales2026 is valid because SALES is beyond the worksheet's column range.

Descriptive words with underscores avoid the risk of accidentally choosing a column-and-row address. Names are written without quotation marks; quoted text is a value, not a name reference.

Inspect a named step

To check the commission rate alone, temporarily replace the last total*rate with rate. For North, the formula then returns 0.05. End it with total to inspect the subtotal. Restore the final expression once those steps are correct.

A name can hold an entire array, not just a number. A final calculation that returns that array spills normally. The name itself does not create an extra worksheet range; only the formula's returned result is displayed.

Keep the final calculation after all pairs. =LET(x,5) leaves it out and is incomplete. If a name should be available to other cells, define a workbook name in Name Manager; LET names remain local to their formula.

Key Takeaways

  • LET contains name-value pairs followed by the result calculation.
  • Names are local, read left to right, and can hold single values or arrays.
  • Reusing a named expression avoids repeating its calculation.
  • Choose meaningful names that do not conflict with cell or reference syntax.
  • Temporarily return a named step to check its value.

5.2 Rewrite a report with named steps

A LET rewrite should keep the same result while making each step easier to follow. Start with a working formula, identify repeated expressions, and decide what each useful name should mean.

Name a repeated condition

This formula sorts the North orders by amount:

=SORTBY(FILTER(A2:D9,B2:B9="North"),FILTER(D2:D9,B2:B9="North"),-1)

The region condition appears twice. Give it the name keep, then use that name in both filters:

=LET(keep,B2:B9="North",rows,FILTER(A2:D9,keep),amounts,FILTER(D2:D9,keep),SORTBY(rows,amounts,-1))

keep holds eight TRUE/FALSE results. rows holds the three matching records. amounts holds their three amounts. The final SORTBY returns Chen 650, Ana 420, Fay 275, just as before. Changing the criterion now requires one edit.

Reuse a field already in the filtered rows

The matching rows already contain Amount in column 4, so a second FILTER is unnecessary:

=LET(rows,FILTER(A2:D9,B2:B9=H1),SORTBY(rows,INDEX(rows,0,4),-1))

INDEX selects the fourth column from rows. Both data and sort key therefore come from the same array in the same order. This also removes one place where a later edit could accidentally give the key a different condition.

Handle an empty selection before processing rows

A no-match message is one text value, not four data columns. Guard the report before selecting its amount column or sorting:

=LET(keep,B2:B9=H1,IF(OR(keep),SORTBY(FILTER(A2:D9,keep),FILTER(D2:D9,keep),-1),"No orders"))

OR combines the eight keep tests into one answer. If at least one is TRUE, the report branch filters and sorts the matching rows. Otherwise the formula returns "No orders".

This use of OR is deliberate. Inside FILTER's include argument, you need one decision per source row and use arithmetic to combine conditions. Outside FILTER, this IF needs a single decision about the entire list, so OR is appropriate.

Check the rewrite in stages
  1. End the LET with keep to inspect which rows qualify.
  2. Return the filtered rows and compare names and row count with the original.
  3. Restore the final sort and compare the complete ordered output.
  4. Change H1 and test a region with matches and one without matches.

When introducing a name, replace every copy of the expression it represents. Leaving one old condition behind can make the report data and its key disagree after the named condition is changed.

Choose names such as keep, rows, amounts, and total that describe the values. In Excel for Windows, Alt+Enter in the formula bar lets you put pairs on separate lines without changing the calculation. Pair ordering still matters: a later value can depend on earlier names only.

LET is most useful for repeated expressions and calculations with several meaningful steps. A short =SUM(D2:D9) is already clear. Adding names to it would add reading work without simplifying the rule.

Key Takeaways

  • Give repeated expressions useful names and replace every occurrence.
  • Extract a sort key from the filtered rows to preserve alignment.
  • Use OR for a whole-list existence check, while keeping row-by-row tests inside FILTER.
  • Compare the rewritten output with the original and test an empty case.

5.3 Define and call a small function

LAMBDA defines a custom function using inputs called parameters. Its syntax is =LAMBDA([parameter1,parameter2,…],calculation). The last argument is the calculation to return; up to 253 parameters can be defined.

Supply inputs to get a result

=LAMBDA(x,x+1) defines a rule but does not call it. Alone in a worksheet cell, it returns #CALC!. Add inputs in parentheses immediately after the definition: =LAMBDA(x,x+1)(5) calls the rule with x set to 5 and returns 6.

A definition and a call do different jobs. The definition says what to calculate. The call supplies the actual values for that calculation. A wrong number of inputs returns #VALUE!.

Build a percent-change function

For an old value in B2 and a new value in C2, first test =(C2-B2)/B2 as an ordinary formula. With 80 changing to 100, it returns 0.25. Apply Percentage format to display 25%.

Now replace the two cell references with parameters and test the complete function:

=LAMBDA(old,new,(new-old)/old)(80,100)

The first input goes to old, and the second goes to new. The change is 20 divided by the old value 80. With inputs 60 and 45, the result is -0.25, a fall of 25%. The old value must be nonzero because it is the divisor.

Swapping the original inputs gives =LAMBDA(old,new,(new-old)/old)(100,80), which returns -0.2. A fall from 100 to 80 uses 100 as its base, so it is not the negative of a 25% increase from 80 to 100.

Use parameters that describe the inputs

Parameter names follow Excel's naming rules and cannot contain a period. Names such as old, new, and row_vals are clear. Avoid cell-like names and the reserved single letters c and r. Keep the same parameter order in the definition, test call, and any description you later save.

A function built from ordinary array arithmetic can also accept ranges. Calling the percent-change rule with B2:B5 and C2:C5 returns one change per corresponding pair and spills four results. The ranges must describe matching records.

Name steps inside the function

LET can make a LAMBDA calculation easier to read:

=LAMBDA(net,rate,LET(tax,net*rate,net+tax))(200,0.21)

The inputs are net 200 and rate 0.21. LET calculates tax as 42, then adds it to net, returning 242. tax exists inside that calculation; net and rate receive values from the call.

Apply a rule to each row

BYROW takes an array and a LAMBDA that processes each row. =BYROW(B2:D4,LAMBDA(row_vals,MAX(row_vals))) finds the maximum of each of the three rows and returns a three-row column. The parameter row_vals receives one row at a time. Return one result for each row.

LAMBDA and BYROW need Microsoft 365 or Excel 2024. Once a function passes its small worksheet tests, save its definition under a workbook name to call it without repeating the LAMBDA wrapper.

Key Takeaways

  • A LAMBDA definition needs a call with inputs to calculate a worksheet result.
  • Inputs are assigned to parameters in their written order.
  • Test the ordinary calculation first, then test the LAMBDA with known inputs.
  • Array arithmetic in a LAMBDA can spill one result per input pair.
  • LET names intermediate steps; BYROW applies a LAMBDA to one row at a time.

5.4 Save a function for the workbook

A tested LAMBDA becomes easier to reuse when you save it under a meaningful name. Every formula that calls that name then uses the same definition, so a change to the rule has one home.

Save the definition without the test call

For a percent-change function, use this definition:

=LAMBDA(old,new,(new-old)/old)

In Excel for Windows, choose Formulas > Name Manager > New. On a Mac, choose Formulas > Define Name. Enter:

  • Name: PCTCHANGE.
  • Scope: Workbook.
  • Comment: "Returns the change from old to new as a fraction of old; old must be nonzero."
  • Refers to: the LAMBDA definition above.

Save the name. The comment helps identify the inputs when using Formula Autocomplete. Keep its input order consistent with the function's definition.

Do not save =LAMBDA(old,new,(new-old)/old)(80,100) as the definition. That expression calls the rule immediately with fixed inputs and returns 0.25. The reusable name needs to refer to the function itself, ready to receive new inputs.

Call it from cells and ranges

Enter =PCTCHANGE(B2,C2) to calculate the change from B2 to C2. Format the result as a percentage. The worksheet call supplies inputs; the saved definition supplies the calculation.

For four products, let the old values in B2:B5 be 80, 120, 50, and 200, and the new values in C2:C5 be 100, 126, 45, and 230. =PCTCHANGE(B2:B5,C2:C5) in D2 returns four changes:

OldNewDisplayed change
8010025%
1201265%
5045-10%
20023015%

Each row uses its own old value as the base. The single formula spills into D2:D5. Calling PCTCHANGE with only one input or with three inputs returns #VALUE! because its definition has two parameters.

Choose names and scope carefully

A defined function name starts with a letter or underscore, has no spaces, and cannot look like a cell reference. PCT1 is a worksheet address, so use a name such as PCTCHANGE or Pct_Change. Descriptive names also make formulas easier to understand when someone opens the workbook later.

Workbook scope makes the name available on every sheet in that workbook. Sheet scope restricts it to that sheet's local naming context; an unqualified call from another sheet will not find it. Choose Workbook when the function is meant to be shared across the file.

Maintain one rule and move it deliberately

Editing the LAMBDA definition in Name Manager updates formulas that call that name. Check representative inputs after any rule change, including decreases if the function calculates change, and confirm that all callers still pass inputs in the expected order.

A named function belongs to its workbook. Another workbook needs its own definition, which you can create by copying the Refers to formula into a new name there. A named LAMBDA is useful for a meaningful calculation repeated in many places, such as percent change or commission. A one-time calculation can stay as an ordinary formula.

Key Takeaways

  • Save the LAMBDA definition in Name Manager without its worksheet test call.
  • Workbook scope makes an unqualified function call available across sheets in that file.
  • A named LAMBDA can receive ranges and return a spill.
  • Edit the saved definition to update callers, and define it separately in another workbook.
6

Share formulas across Excel versions and Sheets

A workbook can open successfully while some of its formulas cannot recalculate. Before sharing a live report, check the functions the recipient’s version supports and decide whether the recipient needs editable calculations or just the results. Google Sheets adds another kind of check: it supports arrays, but its filtering, sorting, and referencing rules differ from Excel’s. Test those calculations after moving a workbook.

6.1 Check function support and older formulas

A workbook needs support for every function it uses. Opening the file is not enough: a recipient must be able to recalculate the formulas and change their inputs successfully.

Check the required function group
Excel versionFunctions used here
Microsoft 365 and Excel 2024FILTER, SORTBY, SEQUENCE, LET, LAMBDA, BYROW, TAKE, CHOOSECOLS, HSTACK, VSTACK.
Excel 2021FILTER, SORTBY, SEQUENCE, LET, plus SORT and UNIQUE in combined formulas.
Excel 2019 and earlierNo dynamic-array support or these newer functions.

Dynamic arrays also work in Excel for the web and mobile apps. The newer LAMBDA and array-selection functions are supported in Microsoft 365, including Excel for the web. Excel 2021 cannot run a report merely because its FILTER is supported if the same formula also uses TAKE.

Understand _xlfn. and fixed legacy arrays

An unsupported function can appear with an _xlfn. prefix in an older Excel formula bar. When recalculated, the cell returns #NAME?. Deleting the prefix does not add the missing function. Saved values might be visible before recalculation, so test the workbook's behavior instead of judging support from its first display.

Older Excel represents a spilling formula as a legacy array occupying the cells saved with its result. It cannot grow or shrink there. Functions that the old version lacks still cannot calculate inside that fixed range.

Legacy CSE formulas were entered by selecting the whole output area and pressing Ctrl+Shift+Enter. Excel displays braces such as {=A2:A9*2} around them; the braces are not typed. They continue to work in dynamic Excel but keep their fixed size.

To convert a suitable legacy array in dynamic Excel, copy the formula text from its top-left cell, delete the whole legacy output range, and enter the text in the anchor with Enter. Leave room for the new spill. Deleting only part of a legacy array is not allowed.

Read the @ operator

Implicit intersection reduces an array or range to one value. Older Excel did this silently where a single value was expected. Modern Excel can show an @ to preserve that behavior.

In row 5, =@A2:A9 returns A5 only. In a row outside 2 through 9, it returns #VALUE! because no cell of that vertical range meets the formula's row. Removing the @ changes the formula to =A2:A9, which spills all eight values. Remove it only when that full output is wanted and has room.

Choose how to share

In Excel for Windows, run File > Info > Check for Issues > Check Compatibility. The Compatibility Checker identifies formulas that need attention for selected older versions. Check actual results and recalculation in the intended version too.

For recipients using Excel 2019 or earlier, share a separate results copy with Paste Special > Values if they only need the numbers. If they need editable calculations, rebuild the necessary reports with supported tools such as SUMIFS, COUNTIFS, and the Filter button. For a live dynamic workbook, confirm support for every function, including named LAMBDA definitions and helper formulas.

Key Takeaways

  • Excel 2021 supports the core dynamic functions and LET, but lacks LAMBDA and the newer selection and stacking functions.
  • An _xlfn. prefix signals an unsupported function; removing it does not restore calculation.
  • Legacy CSE arrays have fixed output sizes.
  • The @ operator returns one intersecting value and can prevent a spill.
  • Check compatibility and choose live formulas, supported replacements, or shared values to suit the recipient.

6.2 Rewrite the parts that differ in Google Sheets

Google Sheets expands array results into neighboring cells too, but an Excel formula may need changes to its arguments or references. Keep the output area clear: a blocked Sheets array shows #REF! with a message that it would overwrite data.

Wrap ordinary range arithmetic

In Sheets, =ARRAYFORMULA(B2:B6*C2:C6) returns all five row-by-row products. Ordinary range arithmetic needs this wrapper to expand in the way it does automatically in dynamic Excel. Ctrl+Shift+Enter while editing can insert ARRAYFORMULA. Functions such as FILTER already process their condition ranges as arrays, so those conditions need no wrapper.

Rewrite FILTER's conditions and empty case

Sheets accepts separate conditions for AND:

=FILTER(A2:D9,B2:B9="South",D2:D9>150)

This returns Ben and Eli. Each condition has eight results matching the eight source rows. Excel's multiplication form also works in Sheets, and addition within one condition still expresses OR.

Sheets FILTER has no Excel-style if_empty argument. No matches produce #N/A. To display a message, use =IFNA(FILTER(A2:D9,B2:B9=H1),"No orders"). Appending "No orders" as another FILTER argument would make it a condition, not a fallback. IFNA handles #N/A, so investigate unexpected source errors instead of assuming every such error means no matches.

Replace SORTBY with SORT

Sheets has no SORTBY. Its SORT takes a column position or a separate one-column range, then TRUE for ascending or FALSE for descending. The separate range must have the same height as the returned data.

The Excel formula =SORTBY(A2:A9,D2:D9,-1) becomes =SORT(A2:A9,D2:D9,FALSE). It returns only names, ranked by amount, from Chen to Hana.

For a four-column filtered report, use =SORT(FILTER(A2:D9,B2:B9=H1),4,FALSE). FILTER returns the chosen region, then SORT uses column 4 within that result. Guard the sorting branch when there are no matches; a one-cell message has no fourth column.

Replace spill references deliberately

Sheets has no # spill operator. An open-ended reference such as G2:J runs to the bottom of the sheet, including cells beyond the current output. It is not an exact equivalent of G2# and can include unrelated entries or blank rows. Keep that area dedicated to the report, or place the producing formula directly inside its consumer so only its result is passed along.

Recreate reusable functions

SEQUENCE, LET, and LAMBDA exist in Sheets with the same basic argument order. Reusable named functions are created under Data > Named functions. For PCTCHANGE, enter old and new as argument placeholders, then set the formula definition to =(new-old)/old. Do not wrap that definition in LAMBDA: the named-function interface supplies the placeholders separately.

After conversion, test a normal result, a changed input, and no matches. Inspect each formula that used SORTBY, a # reference, or FILTER's third argument. Confirm that totals and row counts still describe data rows, especially where an open-ended range has replaced an exact spill reference.

Key Takeaways

  • Use ARRAYFORMULA for ordinary range arithmetic in Google Sheets.
  • Sheets FILTER accepts separate AND conditions and uses IFNA for a no-match message.
  • Sheets SORT accepts a key range or column position and a TRUE/FALSE direction.
  • Sheets has no # operator; open-ended ranges include more than the current spill.
  • Recreate named functions with separate placeholders and a formula definition.

Dynamic Arrays examples

6 Walkthroughs

1

Follow a spill from formula to result

12 steps
Predict output cells, connect a total to a changing list, and diagnose a blocked spill.
  1. 1
    IntroductionGive a formula room to work

    A quantity list has five rows, and you need five line totals. In dynamic Excel, one formula can calculate all five and place them in neighboring cells. That overflow is a spill, and it saves you from copying formulas down. You will predict that output, connect another calculation to its changing size with the # operator, and clear an obstruction when the values cannot appear. Use Microsoft 365, Excel 2021, or Excel 2024 and a clear output area for these examples.

  2. 2
    ExplanationFind the anchor

    The anchor is the cell where you enter the formula. Its result can spill into a rectangular block below or to the right. Click any result cell to see the spill boundary; only the anchor owns an editable formula. A grayed-out formula in another spill cell points back to that shared calculation, so make changes at the top-left cell.

  3. 3
    ExampleCalculate five line totals

    With quantities in B2:B6 and prices in C2:C6, enter =B2:B6*C2:C6 in D2. Excel multiplies B2 by C2, then B3 by C3, through row 6. The five results fill D2:D6. A row containing quantity 4 and price 2.5 contributes 10. Enter the formula once: a copied formula in D3 would occupy part of the first formula’s intended output.

  4. 4
    Key InsightThe inputs set the shape

    Equal-sized ranges pair values by position. A single value can be reused across a whole range, as in =B2:B6*2. A three-row column multiplied by a four-column row makes a 3-by-4 grid because each input expands across the other dimension. Check heights and widths before assuming that two array calculations will produce a single column.

  5. 5
    ChallengePredict a smaller grid

    A clear worksheet area contains =SEQUENCE(2)*SEQUENCE(1,3). What shape and values does it return?

    ---reveal---

    It returns two rows and three columns. The first row is 1, 2, 3; the second is 2, 4, 6. The column 1, 2 is multiplied across the row 1, 2, 3. It produces six cells in a grid, not six values stacked in one column.

  6. 6
    ExampleConnect a total to the list

    Enter =SEQUENCE(10) in A2 and =SUM(A2#) in a separate clear cell. The total is 55. The # operator means the full current spill beginning at A2. Change the sequence to 20 rows: the same SUM now returns 210. A fixed reference to A2:A11 would still sum only the first ten cells and miss the added values.

  7. 7
    ExplanationSelect one report column

    If G2 spills a three-row, four-column report, =ROWS(G2#) returns 3 and =COLUMNS(G2#) returns 4. To use its amount column alone, write =INDEX(G2#,0,4). Row 0 requests the entire fourth column. =SUM(INDEX(G2#,0,4)) totals those amounts without adding numbers from other report columns.

  8. 8
    ChallengeRepair a spill reference

    M4 anchors a changing report, and its second column contains hours. Someone enters =SUM(INDEX(M5#,0,2)). What needs correcting?

    ---reveal---

    Use =SUM(INDEX(M4#,0,2)). M4 is the anchor, so M4# identifies the whole result. M5# returns #REF! even if M5 lies inside that result. INDEX then selects the hours column by its position within the spill.

  9. 9
    ExampleRead the obstruction message

    A four-column filter in G2 needs G2:J4. A note in J3 prevents the entire result from appearing. Select G2, open its error indicator, and choose Select Obstructing Cells to locate the content. Move or clear the note and the result spills. A typed space or a formula returning "" also counts as content; a cell’s blank appearance can be misleading.

  10. 10
    TipCheck more than occupied cells

    Keep spilling output formulas outside Excel tables and away from merged cells. A result must also fit within the worksheet edges. If the error says its size is indeterminate, check for a random row count that changes between calculation passes. Clearing cells will not stabilize a formula such as =SEQUENCE(RANDBETWEEN(1,10)) whose size keeps changing.

  11. 11
    ChallengePlan for the sixth row

    A five-row spill begins at H3. Its total is typed in H8. The source changes so the list needs six rows. What happens, and where should the total go?

    ---reveal---

    The sixth result needs H8, so the typed total blocks the result with #SPILL!. Move the total above the anchor or into another column, and reference the anchor with # if the total should follow the list. Keep the future growth area clear too.

  12. 12
    RecapCheck ownership, reference, and space

    For a spilling calculation, locate the anchor, predict the result’s dimensions, and leave that rectangle free to grow. Connect dependent calculations with the anchor’s # reference, selecting a single column when needed. If output fails, read the error reason: #SPILL! points to placement or size trouble, while FILTER’s no-match #CALC! requires a different selection or an empty-result value.

2

Build a selection one condition at a time

12 steps
Use the orders data to make a region list, add requirements, and handle dates and text.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionChoose what belongs in the list
  2. 2
    ExplanationSeparate output from the test
  3. 3
    ExampleReturn the North orders
  4. 4
    ExampleMove the choice into H1
  5. 5
    ChallengeChoose an output field
  6. 6
    ExplanationRequire both tests
  7. 7
    ExampleAccept either product
  8. 8
    ChallengeGroup alternatives before a requirement
  9. 9
    TipInclude the whole final day
  10. 10
    ExplanationTurn searches into keep tests
  11. 11
    ChallengeLet an empty choice show everything
  12. 12
    RecapKeep one decision per record
3

Order records and create useful series

12 steps
Sort by external or custom keys, then generate numbers and weekly dates.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionChoose an order or create a series
  2. 2
    ExampleRank by a field you do not display
  3. 3
    ExplanationUse a second priority for ties
  4. 4
    ChallengeRead a two-key order
  5. 5
    ConnectionTurn a custom order into ranks
  6. 6
    ExplanationSet SEQUENCE’s four inputs
  7. 7
    ExampleChange the starting point and spacing
  8. 8
    ChallengeLocate a value in a grid
  9. 9
    ExampleCreate weekly dates
  10. 10
    Key InsightLet another result control length
  11. 11
    ChallengeKeep ranks beside a ranked list
  12. 12
    RecapKeep keys aligned and series shaped
4

Assemble a growing region report

15 steps
Filter and sort matching rows, show top results, then connect choices, headings, and totals.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionBuild the report in separate decisions
  2. 2
    ExampleCheck the filtered arrays first
  3. 3
    ExamplePass both arrays to SORTBY
  4. 4
    ChallengeDiagnose a mismatched key
  5. 5
    ConnectionReturn one total instead of a list
  6. 6
    ExampleKeep the top three after ranking
  7. 7
    ExampleKeep names and amounts
  8. 8
    ChallengePredict a bottom selection
  9. 9
    TipKnow the alternatives and tie limits
  10. 10
    ConnectionJoin useful pieces
  11. 11
    ExampleConnect an expanding source and choices
  12. 12
    ExamplePlace headings and a guarded result
  13. 13
    ChallengeChoose a total’s home
  14. 14
    ChallengeCheck an empty report count
  15. 15
    RecapTest the report as a connected whole
5

Turn a long formula into a reusable rule

17 steps
Use LET to name and inspect steps, then test and save a percent-change LAMBDA.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionMake the calculation readable
  2. 2
    ExampleRead the last argument as the result
  3. 3
    ExampleSeparate a total and a rate
  4. 4
    ChallengeInspect the decision boundary
  5. 5
    TipChoose names Excel can read
  6. 6
    ExampleName a repeated selection
  7. 7
    Key InsightTake the key from the filtered records
  8. 8
    ChallengeDecide when OR belongs
  9. 9
    ExampleTest an ordinary change calculation
  10. 10
    ExampleReplace cells with parameters and call
  11. 11
    ChallengeCheck a decrease and swapped inputs
  12. 12
    ConnectionApply a rule across rows
  13. 13
    ExampleSave the callable definition
  14. 14
    ExampleUse one rule for four records
  15. 15
    ChallengeRepair a saved function
  16. 16
    ChallengeKeep local steps and shared rules distinct
  17. 17
    RecapTest before and after reuse
6

Move a live report to another environment

12 steps
Check older Excel behavior and adapt filtering, sorting, and references for Google Sheets.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionCheck calculation, not just file opening
  2. 2
    ExplanationCheck every function in the chain
  3. 3
    ExampleRead unsupported and fixed arrays
  4. 4
    ExampleDecide whether @ should stay
  5. 5
    ChallengeChoose a sharing method
  6. 6
    ExplanationKeep Sheets output clear too
  7. 7
    ExampleRewrite conditions and the no-match case
  8. 8
    ExampleReplace SORTBY with Sheets SORT
  9. 9
    ChallengeTranslate a ranking formula
  10. 10
    TipReplace references and saved functions
  11. 11
    ChallengeProtect a total during conversion
  12. 12
    RecapTest the intended recipient’s work

Dynamic Arrays practice questions

50 Practice Questions in 5 sets

Set 1: Read and build dynamic results10 Practice Questions

Question 1 of 10

What does =LET(base,240,rate,0.08,base*rate) return?
  1. 19.2
  2. 240.08
  3. 259.2
  4. 0.08
Show answerHide answer
Answer: A
LET names 240 as base and 0.08 as rate, then returns their product, 19.2. The final expression decides the result. A total including the original base would be 259.2, but that would require base+base*rate, which is not the calculation written here.

Question 2 of 10

In dynamic-array Excel, =SEQUENCE(4) is entered in F3. Which cells contain its result?
  1. F3:I3
  2. F3:F7
  3. F3:F6
  4. F4:F7
Show answerHide answer
Answer: C
SEQUENCE with one argument returns that many rows, beginning in the formula cell. Four values therefore occupy F3, F4, F5, and F6. F3:I3 would be a horizontal result, which needs columns specified in the second argument.

Question 3 of 10

J4 is the anchor of a list that changes length. What reference follows its entire current output?
  1. J5#
  2. J4#
  3. J4:J10
  4. @J4
Show answerHide answer
Answer: B
The # operator follows the complete spill from its anchor, so J4# changes with the list. J4:J10 remains a fixed seven-cell range and can miss future results. J5# is not a valid spill reference merely because J5 lies inside the output.

Question 4 of 10

A formula in G5 needs G5:H8, but H7 contains a typed space. What fixes its #SPILL! error while keeping the formula in G5?
  1. Clear the content in H7.
  2. Apply General format to H7.
  3. Replace H7 with ="".
  4. Copy G5 into the cells below.
Show answerHide answer
Answer: A
A typed space is cell content and blocks the intended spill. Clearing H7 frees that cell for the result. Replacing the space with a formula returning an empty string still leaves content there, even though the cell looks blank.

Question 5 of 10

Project names are in A2:A7 and statuses in C2:C7. What formula returns names whose status is "Open"?
  1. =FILTER(C2:C7,A2:A7="Open")
  2. =FILTER(A2:A7,C2:C8="Open")
  3. =FILTER(A2:A7,"Open")
  4. =FILTER(A2:A7,C2:C7="Open")
Show answerHide answer
Answer: D
The first argument supplies the names to return, and the include test compares each matching status cell with "Open". Both ranges have six rows. Swapping the ranges would return statuses while testing project names, so it would answer a different question.

Question 6 of 10

An Excel FILTER should display "Nothing due" when no records qualify. Where does that text belong?
  1. In FILTER’s first argument.
  2. In FILTER’s third argument.
  3. As an extra row of source data.
  4. As the last cell of the spill area.
Show answerHide answer
Answer: B
The optional third argument, if_empty, supplies the result when no rows pass the include test. The first argument chooses the source values to return. Typing a message in the spill area instead would obstruct a future result without handling the formula’s empty case.

Question 7 of 10

Names are in A2:A6 and completion dates in E2:E6. What formula returns only names, latest completion first?
  1. =SORTBY(A2:A6,E2:E6,-1)
  2. =SORTBY(A2:A6,E2:E6,1)
  3. =SORTBY(E2:E6,A2:A6,-1)
  4. =SORT(A2:A6,5,-1)
Show answerHide answer
Answer: A
SORTBY can sort names using dates that are outside the returned array. Descending order places the latest date first. SORT with column 5 cannot do this to a one-column name array, because that array has no fifth column.

Question 8 of 10

What values does =SEQUENCE(1,4,6,3) return?
  1. 6, 9, 12, 15 down one column
  2. 6, 12, 18, 24 across one row
  3. 6, 9, 12, 15 across one row
  4. 3, 6, 9, 12 across one row
Show answerHide answer
Answer: C
The arguments request one row and four columns, starting at 6 and increasing by 3. Each next value adds the step to the previous one. Starting at 3 would confuse the fourth argument, which controls spacing, with the third argument, which sets the first value.

Question 9 of 10

A workbook uses FILTER and TAKE. A colleague has Excel 2021. What prevents the report from fully recalculating there?
  1. FILTER is unavailable in Excel 2021.
  2. TAKE is unavailable in Excel 2021.
  3. Excel 2021 cannot spill any formula.
  4. Every spill must be entered with CSE.
Show answerHide answer
Answer: B
Excel 2021 supports dynamic arrays and FILTER, but it does not include TAKE. A report needs every function in its calculation chain to be available. Entering the same formula with Ctrl+Shift+Enter cannot add a function missing from that version.

Question 10 of 10

A2:A6 contains "Ivo", "Luz", "Nia", "Omar", "Paz"; B2:B6 contains "Open", "Closed", "Open", "Closed", "Open"; D2:D6 contains 14, 90, 27, 60, 19. A report should show only Open names, greatest amount first. What formula produces the required list?
  1. =SORTBY(FILTER(A2:A6,B2:B6="Open"),D2:D6,-1)
  2. =FILTER(SORTBY(A2:A6,D2:D6,-1),B2:B6="Open")
  3. =SORTBY(FILTER(A2:A6,B2:B6="Open"),FILTER(D2:D6,B2:B6="Open"),1)
  4. =SORTBY(FILTER(A2:A6,B2:B6="Open"),FILTER(D2:D6,B2:B6="Open"),-1)
Show answerHide answer
Answer: D
The matching names are Ivo, Nia, and Paz, with keys 14, 27, and 19. Filtering both arrays and sorting descending returns Nia, Paz, Ivo. Filtering a sorted name list with the original status order attaches tests to different records and gives the wrong list.
Set 2: Choose conditions and reusable rules10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

=SEQUENCE(3)*SEQUENCE(1,2) is entered in a clear area. What shape does the result have?
  1. 3 rows and 2 columns
  2. 3 rows and 1 column
  3. 1 row and 2 columns
  4. 6 rows and 1 column
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A work list should show tasks assigned to "Mina" with more than 3 hours remaining. Names are in B2:B12 and hours in D2:D12. What include expression fits?
  1. (B2:B12="Mina")+(D2:D12>3)
  2. (B2:B12="Mina")*(D2:D12>=3)
  3. AND(B2:B12="Mina",D2:D12>3)
  4. (B2:B12="Mina")*(D2:D12>3)
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A row is both "Urgent" and assigned to "Jo". In a FILTER include expression, (priority="Urgent")+(owner="Jo") scores that row as 2. How many copies of that source row does this make FILTER return?
  1. Two copies
  2. One copy
  3. No copies
  4. One copy per output column
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A project report sorts by Team ascending and then Score descending. What determines the position of a lower-scoring record from Team A compared with a higher-scoring record from Team B?
  1. Team B appears first because Score is descending.
  2. Their positions depend only on their source row numbers.
  3. Team A appears first because Team is the primary key.
  4. The two keys combine into a single numeric score.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A report uses =TAKE(SORTBY(A2:C20,C2:C20,-1),5). Only three records remain after the source is shortened and the references are adjusted to those three rows. What does TAKE return?
  1. Three records, then #REF! rows
  2. Five copies of the top record
  3. An empty-array #CALC! error
  4. The three available records
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A helper formula in M2 spills distinct department names. What Data Validation List source follows that changing list in Excel?
  1. =M2
  2. =M3#
  3. =M2#
  4. =M2:M5
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A region report uses the selected rows and their amount column, but crashes when H1 names a region with no records. What design both preserves matching sort keys and shows "No records" for an unmatched choice?
  1. Test for any matches, then filter once and sort by the filtered amount column.
  2. Filter with "No records" as fallback, then always sort its fourth column.
  3. Sort all source rows first, then apply the original unsorted row tests.
  4. Filter the returned rows, then sort them by the full source amount column.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

What does =LAMBDA(qty,qty*4)(7) return?
  1. 11
  2. 28
  3. 7
  4. #CALC!
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

You tested =LAMBDA(qty,price,qty*price)(6,8). What should Refers to contain when saving the reusable function LINEVALUE?
  1. =LAMBDA(qty,price,qty*price)(6,8)
  2. =LINEVALUE(6,8)
  3. =LAMBDA(qty,price,qty*price)
  4. =qty*price
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

In Google Sheets, how can =FILTER(A2:C9,C2:C9="Ready") display "No rows" when there are no matches?
  1. =IFNA(FILTER(A2:C9,C2:C9="Ready"),"No rows")
  2. =FILTER(A2:C9,C2:C9="Ready","No rows")
  3. =IFNA(FILTER(A2:C9,C2:C9="Ready",""),"No rows")
  4. =FILTER(A2:C9,C2:C9="Ready")&"No rows"
Show answerHide answer

Save this lesson to see this answer.

Set 3: Trace results and diagnose failures10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A four-column spill starts in H6, and its third column contains quantities. What formula totals those quantities as the spill changes height?
  1. =SUM(INDEX(H6#,3,0))
  2. =SUM(INDEX(H6#,0,3))
  3. =SUM(H6#)
  4. =SUM(INDEX(H7#,0,3))
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A spill needs E4:F9. Those cells contain no values or formulas, but E7:F7 is merged. How can the result appear without changing the formula?
  1. Apply General.
  2. Re-enter as CSE.
  3. Clear headings.
  4. Unmerge E7:F7.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A FILTER returns six records with =FILTER(A2:D13,C2:C13=J1). What change returns only the values from column A while keeping the same records?
  1. Change A2:D13 to A2:A13.
  2. Change C2:C13 to A2:A13.
  3. Change J1 to A1.
  4. Change A2:D13 to A2:D7.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

What is the final value in the second row of =SEQUENCE(2,3,4,2)?
  1. 10
  2. 12
  3. 14
  4. 16
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A2:A5 lists "Rin", "Sol", "Tao", "Uma"; B2:B5 lists "West", "East", "West", "East"; C2:C5 contains 9, 30, 22, 4. A formula sorts names by C descending, then filters that name array using the unchanged test B2:B5="West". What result does it produce?
  1. Tao, Rin
  2. Sol, Rin
  3. Sol, Uma
  4. Rin, Tao
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

An Excel 2021 report has two qualifying records. It must show up to four highest-scoring names and scores from columns 1 and 3. What design avoids invalid row selections and considers every qualifying record?
  1. Sort the qualifying rows, then use INDEX with rows 1 through MIN(4, matching row count) and columns {1,3}.
  2. Select source rows 1 through 4 with INDEX, then filter and sort the selected rows.
  3. Sort the qualifying rows, then use INDEX with SEQUENCE(4) and columns {1,3}.
  4. Select the first two source rows, then sort them and return columns {1,3}.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

Why is tax_rate a valid LET name while tax2027 is not?
  1. LET names cannot contain any digits.
  2. An underscore makes a name case-sensitive.
  3. Names longer than three letters are invalid.
  4. TAX2027 is a cell address; tax_rate is not.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A LET report defines keep as a selected department test. One FILTER uses keep, but the sort-key FILTER still compares the source with "Design". The chosen department changes to "Support", which has the same number of rows. What can happen?
  1. The report must show #VALUE! because the departments differ.
  2. LET forces both FILTER calls to use the keep condition.
  3. The report can run but rank Support records using Design values.
  4. The unchanged key is ignored because the row counts match.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

What result does =LAMBDA(old,new,(new-old)/old)(150,120) return before percentage formatting?
  1. 0.2
  2. -0.2
  3. -0.25
  4. 0.8
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

What does =@B3:B8 return when entered in row 6?
  1. The value in B6
  2. All values in B3:B8
  3. The value in B3
  4. The number of cells in B3:B8
Show answerHide answer

Save this lesson to see this answer.

Set 4: Design reports that survive changes10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A date spill grows from four rows to six. Its two new cells show day numbers while the first four show dates. What explains this?
  1. The formula changed the new dates into text.
  2. A spill can display dates in only four rows.
  3. The new cells became separate anchor formulas.
  4. The new cells kept their existing number format.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A task list must include "Open" tasks from either team "Blue" or team "Gold", and exclude all other tasks. Status is B2:B20 and Team is C2:C20. What include expression enforces the complete rule?
  1. (B2:B20="Open")*(C2:C20="Blue")+(C2:C20="Gold")
  2. (B2:B20="Open")+((C2:C20="Blue")+(C2:C20="Gold"))
  3. (B2:B20="Open")*((C2:C20="Blue")+(C2:C20="Gold"))
  4. (B2:B20="Open")*((C2:C20="Blue")*(C2:C20="Gold"))
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A ranking must show the top two records, with Amount before Name. Data are A2:D15, Name is column 1, Amount column 4, and all amounts differ. What formula applies both requirements?
  1. =CHOOSECOLS(TAKE(SORTBY(A2:D15,D2:D15,-1),2),1,4)
  2. =CHOOSECOLS(TAKE(SORTBY(A2:D15,D2:D15,-1),2),4,1)
  3. =CHOOSECOLS(SORTBY(TAKE(A2:D15,2),TAKE(D2:D15,2),-1),4,1)
  4. =CHOOSECOLS(TAKE(SORTBY(A2:D15,D2:D15,1),2),4,1)
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

What formula creates three rows of weekly dates starting July 6, 2026?
  1. =SEQUENCE(3,1,DATE(2026,7,6),7)
  2. =SEQUENCE(1,3,DATE(2026,7,6),7)
  3. =SEQUENCE(3,1,DATE(2026,7,6),1)
  4. =SEQUENCE(3,7,DATE(2026,7,6),1)
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

Scores in source order are 40, 80, 80, 65, with names "Ari", "Bo", "Cy", "Dee". A top-two report must rank score descending and name ascending to settle ties. What names should it show, in order?
  1. Bo, Cy
  2. Cy, Bo
  3. Bo, Dee
  4. Ari, Bo
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A report must include new source rows, allow a new department as a drop-down choice, and leave room for extra matching records. What arrangement meets all three needs?
  1. A fixed source range, a UNIQUE helper spill used by validation, and a total above the report.
  2. A source table, a typed fixed validation list, and a total above the report.
  3. A source table, a UNIQUE helper spill used by validation, and a total above the report.
  4. A source table, a UNIQUE helper spill used by validation, and a total just below the current output.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

What does =LET(units,12,units+3) return?
  1. 12
  2. 3
  3. 36
  4. 15
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A named LAMBDA has Workbook scope in File A. A colleague types its name in a separate File B, where no such name is defined. What is needed for File B to use the same rule locally?
  1. Change its scope to a sheet in File A.
  2. Define the LAMBDA under a name in File B.
  3. Remove LAMBDA from the saved definition in File A.
  4. Add the old test call to the name in File A.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

An older Excel version shows _xlfn.FILTER and #NAME? after recalculation. What restores a live editable result for that recipient?
  1. Delete only the _xlfn. prefix from the formula.
  2. Rebuild the result with functions that version supports.
  3. Format the formula cell as a number.
  4. Copy the same formula into a larger output range.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A Sheets report should return selected names ranked by their matching scores, greatest first. Names are A2:A12, groups B2:B12, scores D2:D12, and H1 is the chosen group. H1 matches four of the eleven rows, with distinct scores. What rewrite preserves alignment?
  1. =SORT(FILTER(A2:A12,B2:B12=H1),D2:D12,FALSE)
  2. =SORT(FILTER(A2:A12,B2:B12=H1),FILTER(D2:D12,B2:B12=H1),TRUE)
  3. =SORT(FILTER(A2:A12,B2:B12=H1),4,FALSE)
  4. =SORT(FILTER(A2:A12,B2:B12=H1),FILTER(D2:D12,B2:B12=H1),FALSE)
Show answerHide answer

Save this lesson to see this answer.

Set 5: Repair and adapt complete calculations10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

H4 spills four columns: Name, Team, Date, Hours. A formula totals INDEX(H4#,0,4). The anchor is changed to return only Name, Hours, but the total formula is left unchanged. What repair keeps the total tied to the revised report?
  1. Keep column 4 and widen the range.
  2. Use column 2 of H4# for the total.
  3. Change H4# to H5# and keep column 4.
  4. Sum every number in the source data.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A formula returns #SPILL! with an indeterminate-size message. Its row count comes from RANDBETWEEN, and the output area is clear. What change addresses that cause?
  1. Use a stable row count from an input cell.
  2. Move the anchor one column to the right.
  3. Apply a number format to the whole output.
  4. Replace empty cells with empty-string formulas.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

Records contain date-times in A2:A40 and statuses in C2:C40. A report needs all "Done" records from February 2026, including entries late on the final day. What include expression fits?
  1. (A2:A40>=DATE(2026,2,1))*(A2:A40<=DATE(2026,2,28))*(C2:C40="Done")
  2. (A2:A40>DATE(2026,2,1))*(A2:A40<DATE(2026,3,1))*(C2:C40="Done")
  3. (A2:A40>=DATE(2026,2,1))*(A2:A40<DATE(2026,3,1))*(C2:C40="Done")
  4. ((A2:A40>=DATE(2026,2,1))+(A2:A40<DATE(2026,3,1)))*(C2:C40="Done")
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

In Excel, a single-column filtered product list spills in M3. How can COUNTIF count "Cable" entries using that calculated list?
  1. =COUNTIF(FILTER(A2:A15,B2:B15=H1),"Cable")
  2. =COUNTIF(M4#,"Cable")
  3. =COUNTIF(M3,"Cable")
  4. =COUNTIF(M3#,"Cable")
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A priority list in J2:J4 is "High", "Medium", "Low". Tasks are A2:A10, priorities B2:B10, and due dates D2:D10. Every priority occurs in J2:J4. What formula returns tasks by that priority order, earliest date within each priority?
  1. =SORTBY(A2:A10,B2:B10,1,D2:D10,1)
  2. =SORTBY(A2:A10,MATCH(B2:B10,J2:J4,0),1,D2:D10,1)
  3. =SORTBY(A2:A10,D2:D10,1,MATCH(B2:B10,J2:J4,0),1)
  4. =SORTBY(A2:A10,MATCH(B2:B10,J2:J4,0),-1,D2:D10,1)
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A report uses a table, a helper list in L2, and a four-column result in G4:J. The displayed row count is =ROWS(G4#). For a choice with no matches, G4 shows "No records" and the count shows 1. What should change?
  1. Move the helper list inside the report’s columns.
  2. Use =COLUMNS(G4#) as the record count.
  3. Set the count to 0 when no source rows match.
  4. Remove the display message so the count stays numeric.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A2:C7 contains Name, Department, Score. H1 selects a department with at least one match. A LET rewrite should evaluate FILTER once and return matching names and scores, highest score first. What formula guarantees this output for any arrangement of the matching scores?
  1. =LET(rows,FILTER(A2:C7,B2:B7=H1),CHOOSECOLS(SORTBY(rows,INDEX(rows,0,3),-1),1,3))
  2. =LET(rows,FILTER(A2:C7,B2:B7=H1),CHOOSECOLS(SORTBY(rows,INDEX(rows,0,2),-1),1,3))
  3. =LET(rows,FILTER(A2:C7,B2:B7=H1),CHOOSECOLS(SORTBY(rows,INDEX(rows,0,3),1),1,3))
  4. =LET(rows,FILTER(A2:C7,B2:B7=H1),CHOOSECOLS(SORTBY(rows,INDEX(rows,0,3),-1),1,2))
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

B2:D4 contains three rows of readings. What shape does =BYROW(B2:D4,LAMBDA(row_vals,MAX(row_vals))) return?
  1. One row containing three maxima
  2. A 3-by-3 grid of all readings
  3. One cell containing the overall maximum
  4. One column containing three maxima
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A function saved as =LAMBDA(before,after,(after-before)/before) works on its defining sheet. An unqualified call on another sheet gives #NAME?. The inputs are valid and the name was created with sheet scope. What fixes reuse across sheets while preserving the rule?
  1. Create a workbook-scoped name for the same LAMBDA definition.
  2. Save the same name with its successful numeric test call.
  3. Swap before and after in every call on other sheets.
  4. Replace the LAMBDA calculation with its most recent result.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

In Google Sheets, source rows A2:D12 have Region in B and Amount in D. A region report spills into G2:J using the choice in H1. Unrelated numeric estimates may appear farther down J. What total formula sums only the chosen region’s source amounts and returns 0 for no matches?
  1. =IFNA(SUM(FILTER(D2:D12,B2:B12<>H1)),0)
  2. =IFNA(SUM(FILTER(D2:D12,B2:B12=H1,0)),0)
  3. =IFNA(SUM(FILTER(D2:D12,B2:B12=H1)),0)
  4. =IFNA(SUM(FILTER(J2:J,J2:J<>"")),0)
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

66 Key Terms, each with its definition

A

Aggregate
An aggregate combines several values into one result, such as the sum or average of the amounts returned by a filter.
When three filtered North amounts total 1345, SUM around them returns 1345 instead of displaying the three individual amounts.
Anchor
An anchor is the top-left cell of a spill range, containing the editable formula and the first value of its result.
To change the calculation behind G2:J4, edit the formula in G2, the range’s anchor.
Array expansion
Array expansion repeats a single row or column across another array’s corresponding dimension during an array calculation.
Multiplying a three-row column by a four-column row expands both inputs into a 3-by-4 result.
ARRAYFORMULA
ARRAYFORMULA enables Google Sheets to expand ordinary range calculations or use arrays where the calculation needs explicit array handling.
Use =ARRAYFORMULA(B2:B6*C2:C6) for five row-by-row products instead of a single result.

B

BYROW
BYROW applies a LAMBDA to each row of an array, asking it for one value per row and returning those values in a column.
BYROW with MAX returns a separate largest reading for each row instead of one maximum for the full range.

C

CHOOSECOLS
CHOOSECOLS returns specified columns from an array in the requested order, with negative positions counted from the right.
For a table with Rep in column 1 and Amount in column 4, selecting positions 4,1 displays Amount before Rep.
Compatibility Checker
The Compatibility Checker identifies workbook features and formulas that may not behave as intended in selected older Excel versions.
Run the checker before sharing a workbook whose report uses functions a recipient’s version might lack.
Criterion
A criterion is a value or condition used to decide which records qualify, such as a region name or an amount threshold.
Typing "East" into the report’s criterion cell changes which region’s records appear in the result.
Custom sort order
A custom sort order follows a chosen category sequence, often converted to numeric ranks with MATCH against an ordered list.
Ranks from North, South, East place South before East even though alphabetical ordering would do the reverse.

D

Data Validation list
A Data Validation list provides selectable input values in a cell, using a specified source such as an expanding helper spill.
Set H1’s validation source to =K2#, the spill of a region list, so newly added regions become available as report choices.
Date serial
A date serial is the day number Excel stores for a date; a number format controls whether it appears as a date or a number.
March 2, 2026, has serial 46083 in the standard 1900 date system and can be advanced seven days by adding 7.
Dynamic array formula
A dynamic array formula can return several values, which Excel places into a range of neighboring worksheet cells.
The formula =B2:B6*C2:C6 returns five line totals from one entry in the output’s top cell.

E

Exclusive upper boundary
An exclusive upper boundary is an ending value that is excluded from a selection, often used with the < comparison operator.
Selecting date-times before April 1 includes late March 31 entries without including any April entries.

F

FILTER
FILTER is a function that returns rows or columns from an array according to a matching set of TRUE/FALSE include decisions.
A region test lets FILTER return North records while the original orders remain visible in source order.
Final calculation
The final calculation is LET’s last argument, deciding which scalar or array the formula returns after its name-value pairs.
In a LET formula naming total and rate, ending with rate shows the selected rate for checking; ending with total*rate returns commission.
Fixed reference
A fixed reference identifies a specified cell or range that does not expand merely because a nearby formula’s output grows.
The range G2:G6 misses the seventh value when the spill beginning in G2 grows to seven rows.
Formula rewrite
A formula rewrite changes a calculation’s expression or organization while preserving its intended results for the same inputs.
A LET rewrite replaces repeated region tests with the name keep, and its result is checked against the original formula’s sorted report.
Function call
A function call supplies the inputs that make a function evaluate, including parentheses after a worksheet LAMBDA definition.
Adding (80,100) after the percent-change LAMBDA tests the rule with old 80 and new 100.

G

Growth area
A growth area is the clear worksheet space reserved for a spill to occupy when its future result becomes larger.
Placing totals above a report keeps its growth area free when additional source records qualify.

H

Helper spill
A helper spill is an array result used as input by another worksheet feature or calculation, such as a list of distinct choices.
A sorted UNIQUE region list in K2 supplies the choices for a report’s region drop-down.
HSTACK
HSTACK combines arrays horizontally, placing their columns side by side in the order supplied to the function.
HSTACK can place a generated column of ranks beside a matching column of top-scoring names.

I

if_empty
The if_empty argument supplies Excel FILTER’s returned value when no rows or columns pass the include test.
A displayed list can use "No orders" as if_empty, while a filtered SUM can use the number 0.
IFNA
IFNA returns a chosen replacement when its input evaluates to #N/A, which includes a Google Sheets FILTER with no matching rows.
Wrapping a Sheets filter in IFNA can display "No orders" when the selected region has no matches.
Implicit intersection
Implicit intersection reduces an array or range to one value, using the formula’s row or column when intersecting a range.
In row 5, =@A2:A9 returns A5 while removing @ requests the whole eight-cell range as a spill.
Include array
An include array is the aligned collection of keep-or-drop results that FILTER applies to the source rows or columns.
Comparing eight region values with a criterion cell produces eight decisions for the eight records being filtered.
Indeterminate size
An indeterminate size is an output size that keeps changing between calculation passes, so Excel cannot settle the spill range.
A SEQUENCE row count from RANDBETWEEN can keep changing while Excel resolves the calculation.
INDEX column selection
INDEX column selection returns a whole array column by using 0 as the row argument and the desired column position.
The expression INDEX(G2#,0,4) supplies the amount column of a four-column report to SUM.
Intermediate result
An intermediate result is a value or array produced during a larger calculation and passed to a later step before the final output.
Returning a LET name for the filtered rows temporarily lets you inspect those records before adding their sorting step.

L

LAMBDA
LAMBDA defines a custom calculation in terms of input parameters, which receive actual values when the function is called.
A percent-change LAMBDA uses old and new parameters to apply one rule to different pairs of values.
Legacy CSE array
A legacy CSE array is an array formula entered into a preselected range with Ctrl+Shift+Enter, retaining a fixed output size.
A legacy array can calculate several values but does not automatically grow when the source gains more records.
LET
LET assigns local names to values or expressions inside one formula and returns a final calculation using those named steps.
A commission formula can name its regional total once and reuse it when choosing and applying a rate.
Live report
A live report is a formula-driven display linked to source data and input choices, updating its results when those values change.
Choosing another region changes the sorted records and their total without copying or refreshing the formulas.
Local scope
Local scope limits a name’s availability to the formula or calculation where it is defined, without creating a workbook-wide name.
A name defined inside LET cannot be used in another cell merely because the first formula has calculated it.

M

Membership test
A membership test checks whether each source value appears in an allowed list, often using ISNUMBER with an exact MATCH.
A region list containing North and East can control FILTER without a separate equality test for each region.
Merged cells
Merged cells are worksheet cells joined into one display area, which a spilling formula cannot use as separate output cells.
Unmerge the empty cells in a report’s intended output area to let its values occupy individual cells.

N

Name Manager
Name Manager is Excel’s interface for inspecting and maintaining defined names, including names referring to LAMBDA definitions.
In Windows, open Formulas > Name Manager > New to save a tested function under a readable name.
Name-value pair
A name-value pair assigns a readable identifier to a value or expression, letting later steps use that identifier in a LET formula.
The pair total,SUMIFS(amounts,regions,H1) defines total before a later rate expression refers to it.
Named LAMBDA
A named LAMBDA is a function definition saved under an Excel defined name so formulas can call it without repeating its wrapper.
After saving PCTCHANGE, =PCTCHANGE(B2,C2) applies the stored percent-change rule to those cells.
Nested formula
A nested formula places one function inside another, passing the inner function’s complete result into an outer calculation.
A FILTER result can become SORT’s input without displaying a separate intermediate list on the worksheet.

O

Obstructing cell
An obstructing cell contains a value or formula in an area needed by a spill, preventing the formula’s result from appearing.
A note in J3 blocks a report that needs G2:J4, even if the other output cells are empty.
Open-ended range
An open-ended range extends to the sheet’s last row or column instead of ending at the current result, including cells beyond a spill.
The Sheets range G2:J can include unrelated values below a report, so it needs a dedicated output area.

P

Parameter
A parameter is a named input placeholder in a function definition, receiving a value or range from its position in a call.
In LAMBDA(old,new,…), the first supplied input goes to old and the second goes to new.
Partial-text match
A partial-text match finds a character sequence within a longer text value, which SEARCH can test without regard to case.
The search text "ink" can match a product description such as "Blue ink refill" within a longer cell value.

R

Range-only argument
A range-only argument requires worksheet cells as its input and cannot directly consume an array calculated inside a formula.
COUNTIF can read a product spill through its # reference even though its range cannot be a nested FILTER array.
Refers to
The Refers to field contains the expression or reference behind an Excel defined name, including a reusable LAMBDA definition.
For a named function, Refers to keeps the LAMBDA parameters and rule but leaves off the numeric test call.
Row alignment
Row alignment means that corresponding positions in data and key arrays describe the same records in the same order.
Filtering both names and amounts with one condition preserves row alignment for a subsequent SORTBY.
Row-by-row AND
Row-by-row AND keeps a record only when all of its conditions pass, expressed by multiplying parenthesized test arrays in FILTER.
A South test multiplied by an amount-above-150 test keeps South orders above 150 but excludes smaller South orders.
Row-by-row fill
Row-by-row fill is SEQUENCE’s ordering of values across each row before moving to the first cell of the next row.
In a 3-by-4 SEQUENCE starting at 1, the second row starts at 5 after the first row ends at 4.
Row-by-row OR
Row-by-row OR keeps a record when at least one of its conditions passes, expressed by adding parenthesized test arrays in FILTER.
Adding Ink and Toner tests keeps either product without making copies of a row that passes both tests.

S

Secondary key
A secondary key decides the order of records whose primary-key values are equal, leaving the primary grouping intact.
Amount descending can order records within each region after Region ascending establishes the groups.
SEQUENCE
SEQUENCE generates a numeric array of a specified height and width, beginning at a chosen value and changing by a fixed step.
A one-column SEQUENCE with five rows and step 7 can supply five weekly dates after date formatting.
Sheets named function
A Sheets named function saves a reusable formula with separately entered argument placeholders through Data > Named functions.
To recreate percent change, enter old and new as placeholders and =(new-old)/old as the definition.
Sort key
A sort key is the range or calculated array whose values determine how corresponding records are ordered in a sorted result.
A LEN calculation supplies text lengths as the sort key when names should be ordered from shortest to longest.
SORTBY
SORTBY returns an array arranged by one or more aligned key arrays, without changing the order of the source records.
A name-only report can use a separate amount column as SORTBY’s key without displaying that column.
Spill range
A spill range is the rectangular block of worksheet cells occupied by one dynamic array formula’s current result.
A filter returning three records with four fields occupies a spill range three rows high and four columns wide.
Spill range operator
The spill range operator is the # symbol after an anchor address, referring to that formula’s whole current output range.
The reference G2# follows the report’s changing row count without editing a fixed ending cell.
Spilling
Spilling is Excel’s placement of an array formula’s returned values into cells below or to the right of the formula cell.
Entering =SEQUENCE(4) in H3 spills four consecutive numbers down the worksheet through H6.
Step
A step is the change from one generated value to the next in a sequence; it can be positive, negative, decimal, or zero.
A start of 10 and a step of 5 produce 10, 15, 20, and 25 across four positions.
Structured reference
A structured reference identifies an Excel table or one of its parts by name and adjusts as the table’s data rows change.
The reference Orders[Amount] includes new amounts when more order rows are added to the table.

T

TAKE
TAKE returns consecutive rows or columns from the beginning or end of an array, using a negative count to select from the end.
TAKE with a row count of 3 keeps the first three records after the full list has been sorted.
Top-N cutoff
A top-N cutoff keeps a chosen number of ranked records and can split a group whose sorting values tie at that position.
A top-three report may include only one of two records tied at the third-largest amount.

V

VSTACK
VSTACK combines arrays vertically, placing each array’s rows below those of the preceding array in the returned result.
VSTACK can join the source’s header row above a filtered result so one anchor returns both parts.

W

Whole-list test
A whole-list test reduces several decisions to one result about the collection, such as whether any source row qualifies.
OR applied to keep, a LET name for the include tests, lets IF choose between building a sorted report and showing a no-match message.
Workbook scope
Workbook scope makes a defined name available to formulas across the sheets of its own workbook through an unqualified name.
A workbook-scoped PCTCHANGE can be called from the report sheet as well as the source-data sheet.

#

_xlfn. prefix
The _xlfn. prefix marks an Excel function unsupported by the version reading the workbook, often followed by #NAME? on recalculation.
Removing _xlfn. from FILTER’s displayed name cannot make an older Excel version calculate that function.
#SPILL! error
A #SPILL! error means Excel cannot place an array result, because of an obstruction, output location, or unresolved size.
A total typed below a report causes #SPILL! when another matching record needs that cell.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started