Fix: Google Sheets ARRAYFORMULA with IF Statement Not Working

If your ARRAYFORMULA with an IF statement is “not working,” it’s likely because you are using row-level logical operators (like AND or OR) within the array context. Row-level operators reduce the entire array to a single TRUE or FALSE before the IF can process it, causing the formula to only output in the first cell. To fix this, replace row-level logical operators with boolean math: + for OR logic, and * for AND logic.

Excel

=ARRAYFORMULA(IF((A2:A > 10) * (B2:B = "Qualified"), "Process", "Skip"))

The Syntax Breakdown

  • ARRAYFORMULA(...): This instructs Google Sheets to process the enclosed formula not on a single row, but across an entire range, dynamically “spilling” results down the column.
  • IF(criteria, value_if_true, value_if_false): Standard row-level IF logic works fine for single conditions. The problem occurs when you try to use row-level operators inside the array.
  • Row-Level Logic (e.g., AND(A2 > 10, B2 = "Yes")): Crucially, row-level functions like AND and OR are designed to look at a single row. When presented with an array (e.g., A2:A > 10), they aggregate the entire array result first. AND( {T;F;T}, {T;T;T} ) evaluates to a single FALSE, meaning the IF only processes one result for the top cell.
  • Array-Level Boolean Math (e.g., (A2:A > 10) * (B2:B = "Yes")): Arrays in memory are 1s (TRUE) and 0s (FALSE).
    • * (Multiplication) mimics AND. (1 * 1 = 1, 1 * 0 = 0, 0 * 1 = 0, 0 * 0 = 0). Only when both conditions are 1 (TRUE) is the final condition 1 (TRUE). This preserves the array structure for the IF to process row-by-row.
    • + (Addition) mimics OR. (1 + 1 = 2 (treated as TRUE), 1 + 0 = 1, 0 + 1 = 1, 0 + 0 = 0).

Real-World Example: Multi-Condition Project Triage

You are an Operations Manager assigning priority status to new projects. Projects are considered high-priority only if the expected MRR is over $5,000 AND the priority flag is already set to “High” or “Critical.”

You are trying to calculate the Priority Status (Column D) automatically.

Here is your raw data table (A1:C4):

RowA (Project Name)B (Expected MRR)C (Priority Flag)
1Alpha$12,000Low
2Beta$4,500High
3Gamma$9,000Critical

The Application (Why Row-Level Logic Fails): You try to enter this common (incorrect) formula in cell D2:

Excel

=ARRAYFORMULA(IF(AND(B2:B > 5000, OR(C2:C = "High", C2:C = "Critical")), "High Priority", "Standard"))

The Output: Cell D2 incorrectly calculates “Standard” (because Alpha fails the flag check). Cell D3 and D4 remain blank. The AND/OR functions evaluated the entire range as a single block, broken the array.

The Fix: Replace the failing AND/OR logic with boolean multiplication (*) in cell D2:

Excel

=ARRAYFORMULA(IF((B2:B > 5000) * ((C2:C = "High") + (C2:C = "Critical")), "High Priority", "Standard"))

The Final Output: The formula correctly spills down, processing each row’s multi-condition logic independently.

A (Project)B (MRR)C (Flag)D (Status – Formula Output)
Alpha$12,000LowStandard
Beta$4,500HighStandard
Gamma$9,000CriticalHigh Priority

Common Errors & How to Fix Them

  • Formula returns #REF! with “Result was not automatically expanded”: You manual data or text lives in the spill range, blocking the array output. Fix: Hover over the #REF! error to locate the blocking cell, navigate to that exact cell, and press Delete.
  • Formula calculates correctly but only outputs in the top cell: This is the primary symptom of row-level logical functions (AND/OR/NOT) being used incorrectly inside the array. Fix: Prepend your formula with the array implicit intersection operator @ to force single-row behavior before nesting it, or better, replace the AND/OR functions with * and + boolean math to maintain the dynamic spill.
  • Formula only calculates the top cell and displays an error icon: You are using older Google Sheets syntax (like Ctrl+Shift+Enter for an array formula) with new row-level input references, causing a syntax mismatch. Fix: Clear the editor, type only the formula starting with IF (no implicit operations like @), highlight the entire range reference, and press Ctrl+Shift+Enter to let Google Sheets wrap it perfectly: =ARRAYFORMULA(IF(A2:A > 10, ...)).

About the Architect: Grid and Formula

Lead Data Analyst and Workspace Automation Engineer at Grid & Formula. Specializing in Excel logic, Google Sheets architecture, and Notion database blueprints. I build and rigorously test the formula frameworks and error fixes published here, ensuring you get immediate, no-fluff solutions to your most complex data bottlenecks.