luvv to helpDiscover the Best Free Online Tools
Topic 12 of 14

Array Formulas Basics

Learn Array Formulas Basics for free with explanations, exercises, and a quick test (for Data Analyst).

Published: December 20, 2025 | Updated: December 20, 2025

Why this matters

Array formulas let you process many cells at once with a single formula. As a Data Analyst, that means fewer helper columns, fewer copy-pastes, and fewer errors. Typical tasks where arrays save time:

  • Compute totals from row-by-row calculations without filling down (e.g., quantity × price across thousands of rows).
  • Return multiple results at once (top 3 values, first 5 customers, filtered lists).
  • Apply multiple conditions to calculations without extra columns (e.g., sum revenue where Region = "East" and Product = "A").

Concept explained simply

An array is just a list or grid of values. An array formula takes in a range (or many ranges), does calculations on each item, and returns one value or a whole list of values.

Mental model

Imagine a conveyor belt of values moving through your formula. Instead of handling one box at a time, your formula handles the entire belt at once. If the last step is an aggregator (like SUM), you get one number. If not, you get multiple results that spill into neighboring cells.

Compatibility notes
  • Google Sheets and Excel 365+ support dynamic arrays by default. Many formulas can return multiple results that "spill" down/right.
  • Older Excel versions used Ctrl+Shift+Enter (CSE) for array entry. In modern Excel/Sheets, you usually don’t need CSE.
  • If you see #SPILL! in Excel, it means something blocks the spilled range—clear the cells below/right.

Core patterns you’ll use often

  • Element-wise math across ranges: Range1 * Range2 multiplies each pair of cells.
  • Aggregate after element-wise math: SUM(Range1 * Range2) totals all row results.
  • Multiple criteria via logical tests: (Region="East")*(Product="A") converts TRUE/FALSE to 1/0 so only matching rows contribute.
  • Return multiple items: functions like LARGE(..., SEQUENCE(k)), FILTER(range, condition), UNIQUE(range) can spill multiple results.
  • Sum across criteria without CSE: SUMPRODUCT(--(criteria), values) is array-aware and returns a single result.

Worked examples

Example 1: Total revenue without helper columns

Goal: Sum Quantity × Price across rows.

Formula (Sheets or modern Excel): =SUM(C2:C100 * D2:D100)

Alternative (works broadly, including older Excel): =SUMPRODUCT(C2:C100, D2:D100)

Why it works: Each row’s Qty * Price is computed, then SUM or SUMPRODUCT aggregates the results.

Example 2: Sum with multiple criteria

Goal: Revenue for Region = "East" and Product = "A".

Formula (dynamic arrays): =SUM((A2:A100="East") * (B2:B100="A") * (C2:C100 * D2:D100))

Alternative with SUMPRODUCT (no CSE): =SUMPRODUCT(--(A2:A100="East"), --(B2:B100="A"), C2:C100, D2:D100)

Why it works: Conditions become 1 for matching rows and 0 otherwise, so only matching rows contribute to the sum.

Example 3: Top 3 line amounts (spilled)

Goal: Return the top 3 values of Qty * Price as a list.

Formula (Sheets/Excel 365+): =LARGE(C2:C100 * D2:D100, SEQUENCE(3))

This spills 3 cells with the largest values. If #SPILL! appears, clear cells below.

Step-by-step mini walkthrough

  1. Select the result cell for a single aggregated value (e.g., total revenue). For multi-result output (like Top 3), ensure free space below/right.
  2. Combine ranges with math or comparisons: Range1 * Range2, (Region="East"), etc.
  3. Wrap with an aggregator if you want a single value: SUM(...), SUMPRODUCT(...), COUNT(...).
  4. Press Enter. In modern Excel/Sheets, arrays spill automatically. In older Excel, some formulas need Ctrl+Shift+Enter.

Common mistakes and how to self-check

  • Ranges of different sizes: Mismatched lengths cause errors or wrong results. Self-check: Count rows in each referenced range; they should match.
  • Forgetting the aggregator: C2:C100*D2:D100 alone returns multiple results; if you expected one number, wrap with SUM or use SUMPRODUCT.
  • Blocked spill area (Excel): #SPILL! means something blocks the output range. Clear those cells.
  • Text stored as numbers (or vice versa): Logical tests may fail. Self-check: Use ISTEXT/ISNUMBER or try VALUE() on suspicious data.
  • Unclear intent: Nested arrays can get messy. Self-check: Break the formula into parts and test pieces in helper cells temporarily, then consolidate.

Practice dataset for exercises

Copy this small table to your sheet (A1:D11):

RegionProductQtyPrice
EastA310
WestB57
NorthA212
EastC120
SouthB49
EastB68
WestA311
SouthC215
EastA59
NorthB113

Exercises

These mirror the tasks in the exercise section below (progress is saved only for logged-in users; everyone can attempt).

Exercise ex1 — Sales analysis with array formulas

  • Create a new column E labeled Amount. In E2, compute all line amounts (Qty × Price) with a single array formula that spills.
  • In a separate cell, compute Total Revenue without filling down.
  • Compute Revenue for the East region only.
  • Return the Top 3 line amounts as a spilled list.
Hints
  • Element-wise math: C2:C11*D2:D11
  • Aggregator: SUM(...) or SUMPRODUCT(...)
  • Criterion: (A2:A11="East")
  • Top-k helper: SEQUENCE(3) with LARGE

Self-checklist

  • I can compute a total from row-wise multiplication using a single formula.
  • I can apply one or more conditions using boolean arrays (TRUE/FALSE to 1/0).
  • I can return multiple results that spill (e.g., Top 3 values).
  • I know how to fix #SPILL! by clearing blocked cells.
  • I verify range sizes match across all components.

Mini challenge

Using the same dataset, return the two largest East-region line amounts, sorted descending, without helper columns. Tip: combine the East filter with LARGE(..., SEQUENCE(2)).

Show an approach

Sheets/Excel 365+: =LARGE(FILTER(C2:C11*D2:D11, A2:A11="East"), SEQUENCE(2))

Or as two cells using LARGE with k=1 and k=2 separately.

Learning path

  • Start: Array basics (this lesson) — vectorized math, booleans, aggregation.
  • Next: Dynamic array helpers — FILTER, UNIQUE, SORT, SEQUENCE.
  • Then: Advanced arrays — INDEX/XMATCH with arrays, BYROW/BYCOL (Sheets) or MAP/SCAN (where available).
  • Optional: Matrix operations — TRANSPOSE, MMULT (for special analytics needs).

Who this is for and prerequisites

Who this is for

  • Aspiring or current Data Analysts who work in Excel or Google Sheets.
  • Anyone wanting faster, more reliable spreadsheet analysis with fewer helper columns.

Prerequisites

  • Comfort with basic formulas (SUM, AVERAGE) and ranges.
  • Basic understanding of relative/absolute references (A1 vs $A$1).

Practical projects to solidify skills

  • Sales dashboard: Compute totals by region/product with array formulas only (no helper columns).
  • Top customers list: Return top 10 customers by spend with a single spilled formula.
  • Quality checks: Build a one-cell check that flags mismatched row counts across critical ranges.

Next steps

  • Refactor one of your existing spreadsheets to replace helper columns with array formulas.
  • Practice combining criteria using boolean arrays on a dataset you know.
  • Move on to dynamic array functions like FILTER and UNIQUE for smarter lists.

Before you take the Quick Test

The Quick Test below is available to everyone. If you’re logged in, your progress will be saved automatically.

Practice Exercises

1 exercises to complete

Instructions

Use the dataset in A1:D11 (Region, Product, Qty, Price).

  1. In E2 (header E1 = Amount), compute all line amounts with one array formula that spills down.
  2. Compute Total Revenue in a separate cell without filling down.
  3. Compute Revenue for the East region only.
  4. Return the Top 3 line amounts as a spilled list.
Expected Output
Column E shows line amounts: [30, 35, 24, 20, 36, 48, 33, 30, 45, 13]. Total Revenue = 314. East Revenue = 143. Top 3 amounts = [48, 45, 36].

Array Formulas Basics — Quick Test

Test your knowledge with 6 questions. Pass with 70% or higher.

6 questions70% to pass

Have questions about Array Formulas Basics?

AI Assistant

Ask questions about this tool