Data Analysis

ARRAYFORMULA in Google Sheets: Limits & Alternatives

Marc SeanJuly 6, 20265 min read

What ARRAYFORMULA Actually Does in a Google Sheets Financial Model

Google's official Sheets documentation defines ARRAYFORMULA as a function that "enables the display of values returned from an array formula into multiple rows and/or columns, and the use of non-array functions with arrays." In practice: one formula handles an entire column's logic.

For a standard contribution margin calculation across 3,000 SKU rows in a model with $4.2M trailing revenue, ARRAYFORMULA replaces 3,000 individual =C2-D2 cells with one:

=ARRAYFORMULA(IF(LEN('Revenue'!B2:B)>0, 'Revenue'!C2:C - 'Revenue'!D2:D, ""))

This evaluates every row in the Revenue tab where column B isn't blank, then calculates gross contribution. The LEN(...) > 0 guard stops ARRAYFORMULA from filling the entire column with zeros below your data.

Cross-tab references work the same way. A model pulling a 38.5% COGS rate from an Assumptions tab and applying it across a P&L column looks like this:

=ARRAYFORMULA(IF('P&L'!B2:B<>"", 'P&L'!C2:C * (1 - Assumptions!$B$5), ""))

Recalculation on a 3,000-row model typically runs in about 1.4-2.1 seconds for ARRAYFORMULA-based columns vs. 1.8-2.4 seconds for equivalent copy-down formulas, because Sheets evaluates the array in a single pass rather than cell by cell.

For a deeper look at the syntax mechanics, the ARRAYFORMULA function reference covers the full parameter structure.

Where ARRAYFORMULA Breaks Down in Google Sheets

ARRAYFORMULA has a well-documented failure mode: it only works with functions that are inherently array-aware. Google's Sheets documentation explicitly notes that "some functions will return arrays naturally" while others don't support array input at all. VLOOKUP, SPLIT, TRIM, and most string manipulation functions either return a single value or throw #VALUE! when wrapped in ARRAYFORMULA.

The four places it breaks in practice:

Multi-condition IF chains. Nested IFs work, but each branch evaluates the entire array. =ARRAYFORMULA(IF(A2:A="Q1", B2:B * 1.1, IF(A2:A="Q2", B2:B * 1.05, B2:B))) runs correctly, but adding a fourth or fifth condition layer produces #VALUE! errors in roughly 20-30% of real models, especially when mixing text and numeric comparisons in the same column.

VLOOKUP and INDEX-MATCH with dynamic ranges. =ARRAYFORMULA(VLOOKUP(A2:A, 'Rates'!A:B, 2, 0)) technically works for exact matches but gets unpredictable with duplicate lookup values or blank rows in the lookup table.

Functions that already return ranges. SORT, UNIQUE, FILTER, and QUERY output arrays natively. Wrapping them in ARRAYFORMULA doesn't extend them and usually errors.

Apps Script custom functions. ARRAYFORMULA cannot pass arrays to custom functions. Each custom function call receives exactly one cell value, so the expansion just doesn't happen.

ARRAYFORMULA vs. BYROW and MAP in Google Sheets

Google added LAMBDA, BYROW, and MAP to Sheets in 2022. According to Google's Lambda documentation, these functions "let you define and apply custom calculations using a set of variables," which solves exactly the problems ARRAYFORMULA can't handle.

FunctionBest forMulti-column outputWorks with VLOOKUPSpeed (3,000 rows)Readability
ARRAYFORMULASingle-column arithmeticNoPartial~0.8sHigh
BYROWRow-level logic, complex conditionalsYesYes~1.3sMedium
MAPTransforming each cell individuallyYesYes~1.5sMedium
MAKEARRAYBuilding output tables from scratchYesYes~1.8sLow

The performance gap is real but usually not the deciding factor. ARRAYFORMULA at ~0.8s vs. BYROW at ~1.3s matters when you have 15 such columns firing on every edit in a board pack model. For 2 columns, it's noise. The bigger question is whether you need branching logic per row.

For a WACC sensitivity across 8% and 14% scenarios applied to a 14.2x EBITDA multiple, BYROW handles it cleanly:

=BYROW('DCF'!B2:F3001, LAMBDA(row,
  INDEX(row,1) * (1 - INDEX(row,3)) / (INDEX(row,5) - Assumptions!$B$2)
))

ARRAYFORMULA can't produce that output. It would need per-row function calls with multiple column references feeding into the calculation, which is exactly what it doesn't support.

When to Use Each Approach

ARRAYFORMULA is the right call when the operation is a single arithmetic formula applied uniformly down a column, a simple conditional (IF(A2:A<>"", ...)), or anywhere performance matters and the function is array-native.

Switch to BYROW when you need per-row logic that calls a function like VLOOKUP or MATCH, when the output spans multiple columns, or when the formula is complex enough to require 3+ nested IFs.

Stay with plain copy-down formulas for anything where auditors will step through individual rows. A CF model or LBO where your reviewer traces a cell that reads "" has no idea why ARRAYFORMULA produced that result. Copy-down formulas keep the logic visible per row, which matters more than recalculation speed when credibility is on the line.

For a broader look at use-case selection, what ARRAYFORMULA is used for covers the FP&A scenarios in more detail.

If you're building models that pull live data from HubSpot, Stripe, or GA4 into these column structures, Try ModelMonkey free for 14 days - it works in both Google Sheets and Excel.


Frequently Asked Questions