ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Conditional math
  3. SUMIF Blank and Not Blank Cells in Excel

SUMIF Blank and Not Blank Cells in Excel

By ExcelReady Team·Updated November 2, 2026·6 min read

The short answer

To sum when another cell is blank, use "" as the criteria: =SUMIF(D2:D8,"",C2:C8) adds the amounts in C where column D is empty. To sum when the cell is not blank, use "<>": =SUMIF(D2:D8,"<>",C2:C8). Add more conditions with SUMIFS, such as =SUMIFS(C2:C8,D2:D8,"",B2:B8,"Lior").

Key takeaways

  • "" as the criteria means the checked cell is blank; "<>" means it is not blank.
  • The criteria range is the column that may be blank; the sum range is the column of numbers to add.
  • Blank plus not blank always equals the full total, which makes a quick check.
  • A cell holding a space is not blank. Clean it with TRIM or Find and Replace.
  • ISBLANK inside SUMPRODUCT counts only truly empty cells, not formulas that return "".
On this page+
  1. How to sum if a cell is blank
  2. How to sum if a cell is not blank
  3. Check the result: blank plus not blank equals the total
  4. How to sum blanks with another condition (SUMIFS)
  5. How to total blanks for each client in a summary table
  6. Sum if blank with ISBLANK and SUMPRODUCT
  7. Why SUMIF blank gives the wrong total
  8. Practise it

To SUMIF blank cells, use two double quotes as the criteria: =SUMIF(D2:D8,"",C2:C8) adds the numbers in column C on every row where column D is empty. For cells that are not blank, use "<>" instead. This guide is for anyone who tracks unpaid invoices, open orders or missing dates and needs a total for the rows that still have a gap.

How to sum if a cell is blank#

Use "" as the criteria to match empty cells. SUMIF checks one column for blanks and adds the matching numbers from another column. All examples use this invoice list in A1:D8:

ABCD
1InvoiceClientAmountPaid on
2INV-01Rowan4502 Mar 2026
3INV-02Kemi300
4INV-03Rowan1259 Mar 2026
5INV-04Lior980
6INV-05Kemi21012 Mar 2026
7INV-06Lior640
8INV-07Rowan7520 Mar 2026

To total the unpaid invoices, the ones with no payment date:

Excel formula
=SUMIF(D2:D8,"",C2:C8)
PartWhat it does
D2:D8The column to check for blanks (Paid on)
""The criteria: an empty cell
C2:C8The numbers to add (Amount)

The result is 1,920 (300 + 980 + 640). The two double quotes with nothing between them mean "empty". The SUMIF function guide explains each argument in more detail.

How to sum if a cell is not blank#

Use "<>" as the criteria to match cells that contain something. The <> operator means "not equal to", and with nothing after it, "not equal to empty":

Excel formula
=SUMIF(D2:D8,"<>",C2:C8)

The result is 860 (450 + 125 + 210 + 75), the invoices that have a payment date. The same operator excludes a specific value, such as "<>North"; see SUMIF not equal to for those patterns.

Check the result: blank plus not blank equals the total#

Every row is either blank or not blank in the checked column, so the two SUMIFs must add up to the full total:

Excel formula
=SUM(C2:C8)

This returns 2,780, and 1,920 + 860 = 2,780. If your two results don't add up to the total, some cells only look empty. See the section on fake blanks below.

How to sum blanks with another condition (SUMIFS)#

When you need a blank test and another condition, switch to SUMIFS. Remember that SUMIFS puts the sum range first. To total Lior's unpaid invoices:

Excel formula
=SUMIFS(C2:C8,D2:D8,"",B2:B8,"Lior")

The result is 1,620 (980 + 640). Rowan has no unpaid invoices, so the same formula with "Rowan" returns 0.

You can mix blank checks with any other criteria. For example, unpaid invoices over 500: =SUMIFS(C2:C8,D2:D8,"",C2:C8,">500") returns 1,620. For more number conditions, see SUMIF greater than, and for partial text matches, see SUMIF contains text.

How to total blanks for each client in a summary table#

To get an unpaid total for every client at once, point the criteria at a cell and lock the ranges. Type the client names Rowan, Kemi and Lior in F5:F7, then in G5 type:

Excel formula
=SUMIFS($C$2:$C$8,$D$2:$D$8,"",$B$2:$B$8,F5)

Select G5:G7 and fill down (Windows: Ctrl+D; Mac: ⌘D). You get 0 for Rowan, 300 for Kemi and 1,620 for Lior, which adds up to the 1,920 unpaid total.

The $ signs keep the three ranges fixed on rows 2 to 8 as you fill. F5 has no $, so it moves to F6 and F7. Press F4 on Windows (or ⌘T on a Mac) while the cursor is in a reference to add the $ signs. Don't put F5 in quotes: "F5" would look for the letters F and 5, not the client's name.

Sum if blank with ISBLANK and SUMPRODUCT#

ISBLANK returns TRUE only for a cell that is truly empty. Combined with SUMPRODUCT, it gives the same total without SUMIF:

Excel formula
=SUMPRODUCT(ISBLANK(D2:D8)*C2:C8)

This returns 1,920 on the invoice data. ISBLANK turns each Paid on cell into TRUE or FALSE, multiplying turns those into 1 or 0, and SUMPRODUCT adds the amounts where the result is 1.

The difference shows up with formulas. If column D held a formula such as =IF(B2="","",…) that returns an empty string, SUMIF with "" treats that cell as blank, but ISBLANK says FALSE, because the cell holds a formula. Choose the one that matches what "blank" means in your sheet. The lesson on IS functions lets you test ISBLANK, ISNUMBER and ISTEXT on real cells.

Why SUMIF blank gives the wrong total#

Most problems come from cells that look empty but aren't. Check these:

  1. A space in the cell. A cell with one space is not blank, so "" skips it and "<>" counts it. Click the cell and look at the formula bar. Clear such cells, or use Find and Replace to remove spaces.
  2. An apostrophe or invisible character from an import. Select the column and press Delete on the cells that should be empty.
  3. Ranges of different sizes. D2:D8 with C2:C9 can line up the wrong rows. Make both ranges start and end on the same rows.
  4. Blanks in the numbers column instead. SUMIF already treats an empty Amount as 0. You only need "" when the blank is in the column you check.
  5. Blanks that should be filled. Sometimes a blank means "same as above", for example in exported reports. Fill them first; see how to fill blank cells in Excel.

To count blank rows instead of adding them, =COUNTIF(D2:D8,"") returns 3. And if SUMIF itself is new, start with the guide to using SUMIF.

Practise it#

Try the exercise on this page: it totals the unpaid invoices with a blank criteria. Then practise SUMIF in a live spreadsheet, with and without a separate sum range, and practise ISBLANK and the other IS functions to check what's really in a cell. Each formula is checked as soon as you press Enter.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Total the unpaid invoices. In G2, use SUMIF to add the Amount column (C2:C8) for rows where Paid on (D2:D8) is blank.

fx
ABCDEFGH
1
Invoice
Client
Amount
Paid on
2
INV-01
Rowan
450
46083
Unpaid total
3
INV-02
Kemi
300
4
INV-03
Rowan
125
46090
5
INV-04
Lior
980
6
INV-05
Kemi
210
46093
7
INV-06
Lior
640
8
INV-07
Rowan
75
46101
9
10
11

Tip: Check the Paid on column with "" (two double quotes) as the criteria, then add the Amount column.

Practise this in a lesson

LessonSUMIFAdd up only the numbers that meet a condition, with and without a separate sum range.LessonIS functions and SWITCHCheck what's really in a cell with ISBLANK, ISNUMBER and ISTEXT, and turn short codes into labels with SWITCH.Function guideSUMIFAdd up values that meet one condition with SUMIF. Totals by category, person or amount, the argument-order trap, and a live exercise.

Frequently asked questions

How do I SUMIF a cell is blank in Excel?

+

Use two double quotes as the criteria: =SUMIF(D2:D8,"",C2:C8). It adds the values in C2:C8 on every row where the cell in D2:D8 is empty.

How do I sum only if a cell is not blank?

+

Use "<>" as the criteria: =SUMIF(D2:D8,"<>",C2:C8). The symbol <> means not equal to, and with nothing after it, it means not equal to empty.

Why is my SUMIF blank formula returning 0?

+

The cells that look empty probably contain something, such as a space or an apostrophe. Click one and check the formula bar, then clear those cells or clean the column.

Does SUMIF treat a formula that returns "" as blank?

+

Yes, the "" criteria matches both truly empty cells and formulas that return an empty string. ISBLANK is stricter: it returns FALSE for a cell that holds any formula.

How do I sum with a blank condition and another condition?

+

Use SUMIFS, which takes several range and criteria pairs: =SUMIFS(C2:C8,D2:D8,"",B2:B8,"Lior") adds Lior's amounts where column D is blank.

Sources

  • SUMIF function - Microsoft Support
  • SUMIFS function - Microsoft Support
  • IS functions - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How to sum if a cell is blank
  2. How to sum if a cell is not blank
  3. Check the result: blank plus not blank equals the total
  4. How to sum blanks with another condition (SUMIFS)
  5. How to total blanks for each client in a summary table
  6. Sum if blank with ISBLANK and SUMPRODUCT
  7. Why SUMIF blank gives the wrong total
  8. Practise it

Keep reading

Productivity· 5 min read

Fill Blank Cells With the Value Above in Excel

To fill blank cells with the value above, select the column, press F5, click Special, choose Blanks and click OK. Then type =, press the up arrow and press Ctrl+Enter (Mac: Control+Return). Every blank now copies the cell above it. Finish by copying the column and pasting it as values, so the formulas become fixed text.

Conditional math· 7 min read

How to Use SUMIF in Excel

SUMIF adds up the numbers in the rows that meet one condition. Write =SUMIF(range, criteria, sum_range): the cells to check, what they must match, then the numbers to add. For example, =SUMIF(C2:C9,"Travel",D2:D9) totals all Travel claims. Leave out sum_range when the condition is about the numbers themselves.

Conditional math· 6 min read

SUMIF Contains Text: Sum by Partial Match

To add up rows whose text contains a word, wrap the word in asterisks: =SUMIF(A2:A8,"*hotel*",B2:B8). The * wildcard means any characters, so the formula adds "Hotel London" and "Hotel Paris". Use "*"&D1&"*" for a word in a cell, "<>*hotel*" to exclude it, and SUMIFS when the text must contain two words.

More on conditional math

  • SUMIF Greater Than or Less Than a Number
  • SUMIF Not Equal To: Exclude a Value From a Total
  • SUMIFS Between Two Numbers: Sum Values in a Range
  • SUMIFS: Ignore Blank Criteria and Show All When Empty
  • SUMIFS Not Equal To: Exclude Values From a Total
  • SUMIFS With OR Logic in Excel
All conditional math articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free