Google Sheets SUMIF Blank: How to Sum Empty Cells

How-to basics · Updated November 23, 2026

To sum values in Google Sheets where a corresponding cell is blank, use the SUMIF function with a criterion of "=" (equals nothing) or "" (empty string). For example, =SUMIF(A2:A10, "=", B2:B10) sums all values in B2:B10 where the cell in A2:A10 is truly empty. This article explains the exact syntax, how blank vs. zero vs. text affects results, and how to handle cells that only look empty.

What Does “Blank” Mean in SUMIF?

In Google Sheets, a cell is considered blank if it contains absolutely nothing—no value, no formula, no space character. SUMIF treats blank cells differently from cells containing 0, an empty string "" (returned by a formula), or a space " ". The criterion "=" matches only truly empty cells. If you use "" as the criterion, it also matches cells that contain an empty string from a formula, which can be useful or problematic depending on your data.

Basic SUMIF Syntax for Blank Cells

The SUMIF function has three arguments: SUMIF(range, criterion, [sum_range]). To sum based on blanks in the range, set the criterion to "=" or "". Here are the two most common forms:

  • =SUMIF(A2:A10, "=", B2:B10) — sums B where A is truly blank (no formula, no space).
  • =SUMIF(A2:A10, "", B2:B10) — sums B where A is blank OR contains an empty string from a formula.

Both work in Google Sheets; the difference matters only when your range contains formulas that return "". If you want to exclude those, use "=".

How to Sum When the Sum Range Is Blank

Sometimes you need to sum a range where the cells themselves are blank, but you want to count them as zero. For instance, if you have a column of numbers and a column of corresponding amounts, and you want to sum amounts only where the number column is blank, the same formula works: =SUMIF(A2:A10, "=", B2:B10) sums B where A is blank. If you want to sum the blank cells themselves (which is always zero), that’s not useful—SUMIF sums the values in the sum_range, not the criteria range.

Using SUMIFS for Multiple Conditions with Blanks

If you need to sum based on blanks in one column and another condition in a different column, use SUMIFS. For example, sum amounts in C where A is blank and B equals “Yes”: =SUMIFS(C2:C10, A2:A10, "=", B2:B10, "Yes"). The same blank criteria work in SUMIFS. Note that SUMIFS requires the sum range first, unlike SUMIF.

Common Problems and How to Fix Them

Here are frequent issues users run into:

  • Spaces that look blank: A cell with a space character is not blank. Use =TRIM(A2) to clean data, or use a wildcard criterion like "=" won’t match spaces. To match cells with only spaces, use " " as the criterion, but it’s better to clean the data.
  • Formulas returning empty strings: If a cell contains =IF(...) that returns "", it is not blank. Using "=" excludes it; using "" includes it. Choose based on your intent.
  • Zeros are not blank: A cell with 0 is not blank. If you want to treat zeros as blank, you need a helper column or an array formula like =SUMPRODUCT((A2:A10="")*(B2:B10)) after converting zeros to blanks, but that changes data.
  • SUMIF with blank criterion returns 0 unexpectedly: Check if your range contains spaces or formulas. Use =COUNTBLANK(A2:A10) to see how many truly blank cells exist.

Comparing SUMIF Blank to Other Functions

SUMIF is not the only way to sum based on blanks. Alternatives include:

  • SUMPRODUCT: =SUMPRODUCT((A2:A10="")*B2:B10) sums B where A is blank. This also treats empty strings as blank, similar to "" criterion.
  • FILTER + SUM: =SUM(FILTER(B2:B10, A2:A10="")) is more flexible for complex conditions.
  • QUERY: =QUERY(A2:B10, "select sum(B) where A is null", 0) uses SQL-like syntax. Note that is null matches blanks and empty strings.

Each method has its place; SUMIF is simplest for a single condition.

Frequently Asked Questions

Why does SUMIF with “=” not sum cells that look empty?
Because those cells likely contain a space, a formula returning an empty string, or a non-breaking space. Use =TRIM(A2) to remove spaces, or check with =ISBLANK(A2) to see if it’s truly blank.

Can I sum based on cells that are NOT blank?
Yes, use the criterion "<>" (not equal to nothing). For example, =SUMIF(A2:A10, "<>", B2:B10) sums B where A is not blank. Note that this includes cells with zeros and text.

Does SUMIF treat empty strings from formulas as blank?
Only if you use "" as the criterion. The "=" criterion treats them as non-blank. To include them, use ""; to exclude, use "=".

How do I sum cells that contain only spaces?
Use =SUMIF(A2:A10, " ", B2:B10) to match a single space. But it’s better to clean the data with =TRIM(A2) to remove spaces, then use "=".

Why does my SUMIF return 0 when I expect a sum?
Check that your criteria range and sum range are the same size. Also ensure the criterion is typed correctly—"=" not "=" with extra quotes. Finally, verify there are no errors in the sum range cells.

Can I use SUMIF with blank cells in Google Sheets on mobile?
Yes, the function works the same in the Google Sheets mobile app. Type the formula manually or use the function helper.

Practical Example with Step-by-Step

Assume you have a list of orders in column A (some blank) and amounts in column B. To sum amounts for blank order IDs:

  1. Click on cell D1.
  2. Type =SUMIF(A2:A10, "=", B2:B10).
  3. Press Enter. The result is the total of B where A is empty.

For instance, if A2:A10 contains: blank, 101, blank, 102, blank, and B2:B10 contains 10, 20, 30, 40, 50, the formula returns 10+30+50 = 90.

Key Takeaways

To sum based on blank cells in Google Sheets, use SUMIF with "=" for truly empty cells or "" to include empty strings. Always check for hidden spaces and formula results that look blank. For multiple conditions, use SUMIFS with the same criteria. If you need to treat zeros as blanks, consider cleaning your data first.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.