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. SUMIFS: Ignore Blank Criteria and Show All When Empty

SUMIFS: Ignore Blank Criteria and Show All When Empty

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

The short answer

SUMIFS does not skip a condition whose criteria cell is empty, so the total often drops to 0. To ignore a blank criteria cell, swap it for the * wildcard with IF: =SUMIFS(C2:C8,A2:A8,IF(F2="","",F2),B2:B8,IF(F3="","",F3)). An empty filter cell then matches every text value, so it shows all.

Key takeaways

  • An empty criteria cell is not a wildcard. SUMIFS looks for a match to it and usually returns 0.
  • IF(F2="","*",F2) turns an empty filter cell into *, which matches any text.
    • only matches text. For a column of numbers, use "<>" instead, which matches any non-empty cell.
  • The same trick works in COUNTIFS, AVERAGEIFS, MAXIFS and MINIFS.
On this page+
  1. Why SUMIFS returns 0 when a criteria cell is blank
  2. How to ignore a blank criteria cell with IF and *
  3. How to add an "All" option to a drop-down filter
  4. What if the criteria column holds numbers?
  5. How to include rows where the data itself is blank
  6. How to show which filters are active
  7. Use the same trick in COUNTIFS and AVERAGEIFS
  8. Common mistakes
  9. Practise it

To make SUMIFS ignore blank criteria, replace each empty filter cell with the * wildcard using IF. Then an empty cell means "any value", and your report shows the full total instead of 0. This guide is for anyone building a small report where people type or pick filters, and some filters are often left empty.

Why SUMIFS returns 0 when a criteria cell is blank#

SUMIFS doesn't skip a condition just because its criteria cell is empty. It still tries to match every row against the empty value. Microsoft's COUNTIFS page notes that an empty criteria cell is treated as 0, and SUMIFS uses the same criteria rules. Rows with real text in that column don't match, so they drop out.

All the examples use this sales list in A1:C8, with filter cells for Region in F2 and Channel in F3:

ABC
1RegionChannelAmount
2NorthOnline1200
3SouthStore800
4NorthStore650
5EastOnline900
6NorthOnline400
7SouthOnline1100
8EastStore300

F2 holds North and F3 is empty. The obvious formula is:

Excel formula
=SUMIFS(C2:C8,A2:A8,F2,B2:B8,F3)

It returns 0, not the North total. Every row has a channel, so no row matches the empty F3. If SUMIFS with several conditions is new to you, start with COUNTIFS and SUMIFS with multiple conditions.

How to ignore a blank criteria cell with IF and *#

The fix is to give SUMIFS a wildcard when the filter cell is empty. The asterisk * means "any text", so a condition of * lets every text value through.

Excel formula
=SUMIFS(C2:C8,A2:A8,IF(F2="","*",F2),B2:B8,IF(F3="","*",F3))
PartWhat it does
IF(F2="","*",F2)If F2 is empty, use *; otherwise use the region typed in F2
IF(F3="","*",F3)The same for the channel

Here is what the formula returns for each combination of filters:

F2 (Region)F3 (Channel)ResultRows included
North(empty)2250All North rows
NorthOnline1600North and Online
(empty)Store1750All Store rows
(empty)(empty)5350Every row

Each filter now works on its own. Test every combination like this before you share a report, because a filter that silently returns 0 is easy to miss. The guide to wildcards in SUMIF and COUNTIF criteria explains * and ? in more detail, and the IF function guide covers the IF part.

How to add an "All" option to a drop-down filter#

If the filter is a drop-down list, add All as the first item and test for it instead of an empty cell:

Excel formula
=SUMIFS(C2:C8,A2:A8,IF(F2="All","*",F2))

When the user picks All, SUMIFS gets * and returns 5350. When they pick North, it returns 2250. An explicit All is clearer than an empty cell, because nobody wonders whether the filter was forgotten. To cover both, test for either: IF(OR(F2="",F2="All"),"*",F2).

What if the criteria column holds numbers?#

The * wildcard matches text only, so it skips numbers. If the column holds numbers, such as store numbers or years, use "<>" instead. It means "not empty" and matches any number or text:

Excel formula
=SUMIFS(C2:C8,D2:D8,IF(F4="","<>",F4))

Here D2:D8 would be a store-number column and F4 the store filter. When F4 is empty, every row with a store number counts.

How to include rows where the data itself is blank#

Both * and "<>" leave out rows where that column is empty in the data. Usually that is fine. If those rows must count too, switch to SUMPRODUCT, which can treat an empty filter as "always true":

Excel formula
=SUMPRODUCT(C2:C8*((A2:A8=F2)+(F2="")>0)*((B2:B8=F3)+(F3="")>0))

Each bracket is TRUE when the row matches the filter or the filter is empty. With North in F2 and F3 empty, the result is 2250, the same as before, but rows with no channel would now count as well. The article on SUMIF with blank and non-blank cells covers summing the blank rows themselves.

How to show which filters are active#

When an empty filter means "all", say so on the report, so nobody misreads the total. Build a label with the same IF tests:

Excel formula
="Showing: "&IF(F2="","all regions",F2)&", "&IF(F3="","all channels",F3)

With North in F2 and F3 empty, the label reads Showing: North, all channels. Put it right above the total.

Use the same trick in COUNTIFS and AVERAGEIFS#

Every function in the IFS family uses the same criteria rules, so the same IF wrapper works:

Excel formula
=COUNTIFS(A2:A8,IF(F2="","*",F2),B2:B8,IF(F3="","*",F3))

With North in F2 and F3 empty, this counts 3 orders. Swap COUNTIFS for AVERAGEIFS, MAXIFS or MINIFS and the filters behave the same way. For a full category summary with one total per row, see how to sum by category in Excel.

Common mistakes#

These are the errors people make most when building optional filters:

  1. Returning "" instead of "*". IF(F2="","",F2) still matches only empty cells, so the total stays at 0.
  2. Putting the cell in quotes. "F2" means the letters F and 2, not the value in F2.
  3. Using * on a number column. The wildcard ignores numbers. Use "<>" for those columns.
  4. Partial matches by accident. "*"&F2 is a popular shortcut, but with F2 = North it also matches any text that ends in North, such as Far North. The IF version matches exactly.
  5. Trying to combine filters with OR. These filters are AND logic: every condition must be true. For North or South, add two SUMIFS, as shown in SUMIFS with OR logic.

The SUMIFS function guide lists every argument and the limits of each criteria type.

Practise it#

Optional filters are a favourite in intermediate Excel tests, because they check that you understand criteria rather than just copy formulas. Practise COUNTIFS and SUMIFS in a live spreadsheet: you type each formula and it checks it instantly. Then practise wildcards and cell-based criteria, where * and criteria that point at a cell are the whole lesson.

Try it yourself

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

The report filters by Region (F2) and Channel (F3). F3 is empty, so the total should ignore it. In F5, use SUMIFS with IF(F2="","*",F2) and IF(F3="","*",F3) as the two criteria. Total the Amount column, C2:C8.

fx
ABCDEFG
1
Region
Channel
Amount
2
North
Online
1200
Region
North
3
South
Store
800
Channel
4
North
Store
650
5
East
Online
900
Total
6
North
Online
400
7
South
Online
1100
8
East
Store
300
9
10
11

Tip: Start with =SUMIFS(C2:C8, then A2:A8 with IF(F2="","*",F2), then B2:B8 with IF(F3="","*",F3).

Practise this in a lesson

LessonCOUNTIFS and SUMIFSCount and sum with several conditions at once, and learn why SUMIFS puts the sum range first.LessonWildcards and cell-based criteriaMatch partial text with * and ?, and build criteria from cells like ">"&H5 so your formulas adapt.Function guideSUMIFSTotal values that meet several conditions with SUMIFS. Examples by region, month and number range, common errors, and live practice.Function guideIFLearn Excel's IF function with practical examples: flag budgets, label rows and return blanks. Avoid the classic mistakes and practice live.

Frequently asked questions

How do I make SUMIFS ignore a blank criteria cell?

+

Wrap the criteria in IF and return the * wildcard when the cell is empty: IF(F2="","*",F2). SUMIFS then matches any text in that column, so the condition has no effect.

Why does SUMIFS return 0 when a criteria cell is empty?

+

SUMIFS does not treat an empty criteria cell as all values. It tries to match the empty value, and Microsoft documents that COUNTIFS treats an empty criteria cell as 0. Rows with real text don't match, so the total is 0.

How do I add an All option to a SUMIFS filter?

+

Put All in your drop-down list and use IF(F2="All","*",F2) as the criteria. When the user picks All, SUMIFS gets * and includes every region.

Does the * wildcard include blank cells?

+

No. * matches any text value, but not truly empty cells, so rows where that column is empty are left out. Use the SUMPRODUCT version if those rows must be included.

Sources

  • SUMIFS function - Microsoft Support
  • COUNTIFS function - Microsoft Support
  • IF function - 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. Why SUMIFS returns 0 when a criteria cell is blank
  2. How to ignore a blank criteria cell with IF and *
  3. How to add an "All" option to a drop-down filter
  4. What if the criteria column holds numbers?
  5. How to include rows where the data itself is blank
  6. How to show which filters are active
  7. Use the same trick in COUNTIFS and AVERAGEIFS
  8. Common mistakes
  9. Practise it

Keep reading

Conditional math· 7 min read

COUNTIFS and SUMIFS: Multiple Conditions in Excel

COUNTIFS counts rows that meet several conditions, and SUMIFS adds numbers from those rows. Each condition is a pair: a range, then its criteria. A row counts only if it matches every pair. SUMIFS puts the sum range first: =SUMIFS(E2:E9,A2:A9,"North",C2:C9,"Laptop") totals North laptop revenue.

Conditional math· 7 min read

SUMIFS With OR Logic in Excel

SUMIFS joins every condition with AND, so for OR you combine several sums. Add two SUMIFS: =SUMIFS(E2:E9,A2:A9,"North")+SUMIFS(E2:E9,A2:A9,"East"), or use an array constant: =SUM(SUMIFS(E2:E9,A2:A9,{"North","East"})). When the OR spans two different columns, use SUMPRODUCT so rows that match both aren't counted twice.

Conditional math· 7 min read

Excel Wildcards: *, ? and ~ in COUNTIF and SUMIF

Excel has three wildcard characters for criteria. An asterisk (*) matches any number of characters, so "CAB-*" means starts with CAB-. A question mark (?) matches exactly one character. A tilde (~) before * or ? makes it a normal character. Use them inside quotes in COUNTIF, SUMIF, COUNTIFS and SUMIFS, for example =COUNTIF(A2:A9,"CAB-*").

More on conditional math

  • SUMIFS Not Equal To: Exclude Values From a Total
  • How to Calculate an Average by Group in Excel
  • AVERAGEIF and AVERAGEIFS in Excel
  • AVERAGEIFS in Excel: Averages With Several Conditions
  • Count Cells Above Average in Excel With COUNTIF
  • How to Count by Category 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