Yes, Excel can ignore blank cells in formulas - the cleanest way is to build the blank check into the formula itself, using functions like IF, IFS, FILTER, AGGREGATE or the criteria arguments in AVERAGEIF/SUMIF. Blank cells usually sneak into results as zeros, zero-averages or #DIV/0! errors, so excluding them keeps totals and averages accurate without you having to delete rows manually.

What You'll Need

  • Excel for Microsoft 365, Excel 2021 or later for the FILTER and UNIQUE functions (older versions can still use the IF, IFERROR and AGGREGATE methods)
  • A worksheet with a column or range that contains some blank cells
  • Basic familiarity with entering formulas and typing cell references

Menu names and exact behaviour can differ slightly between Excel for Windows, Excel for Mac and Excel for the web, but the formulas below work identically in all of them unless noted.

Step-by-Step

Method 1: Skip blanks in an average with AVERAGEIF

  1. Click the cell where you want the result.
  2. Type =AVERAGEIF(A2:A20,"<>") and press Enter.
  3. Excel averages only the non-blank cells in A2:A20. Blank cells are ignored automatically.

Method 2: Return nothing instead of a zero or error (IF)

  1. Suppose your original formula in B2 is =A2*10, which returns 0 when A2 is blank.
  2. Change it to =IF(A2="","",A2*10) and press Enter.
  3. Copy the formula down the column (drag the fill handle or double-click it).
  4. Blank source cells now show an empty string instead of a misleading zero.

Method 3: Check whether a cell is truly blank vs. containing an empty string

  1. Be aware that ="" matches both truly empty cells and cells containing "" from a formula.
  2. To test only for genuinely empty cells, use =IF(ISBLANK(A2),"blank","has content").
  3. Use IF(A2="",...) when you want to treat formula-produced empty strings as blank too - this is usually what you want.

Method 4: Filter out blanks from a list (Microsoft 365/Excel 2021)

  1. Click an empty cell with free space below and to the right.
  2. Type =FILTER(A2:A20,A2:A20<>"") and press Enter.
  3. The non-blank values spill into a clean list; blanks are removed entirely.
  4. To remove blanks and duplicates at once, use =UNIQUE(FILTER(A2:A20,A2:A20<>"")).

Method 5: Sum while ignoring blanks and errors (AGGREGATE)

  1. Click the result cell.
  2. Type =AGGREGATE(9,6,A2:A20)
  3. 9 tells Excel to sum and 6 tells it to ignore error values; blanks are skipped automatically either way.

Method 6: Prevent blanks before they happen

  1. Select the range where blanks cause trouble.
  2. Go to Data > Data Validation.
  3. Set Allow to any validation you like, and under Ignore blank, untick the box to stop users entering nothing.

Common Mistakes

  • Confusing "" with a truly empty cell. A cell containing ="" looks blank but is not empty; ISBLANK returns FALSE for it and COUNTA counts it. Use =A2="" style tests to catch both.
  • Using COUNT instead of COUNTA or COUNTBLANK. COUNT only counts numbers; COUNTBLANK counts both empty cells and empty strings.
  • Averaging with plain AVERAGE over a range containing "" results. AVERAGE ignores text like "", but if your cells hold zeros from bad formulas, they drag the average down.
  • Forgetting the spill range. FILTER needs empty cells below it; if something occupies them you'll get a #SPILL! error.
  • Spaces that look blank. A cell with a single space is not blank. Use TRIM on your data or test with TRIM(A2)="".

Tips

  • To count non-blank cells, use =COUNTA(A2:A20) (or =COUNTIF(A2:A20,"<>") to exclude invisible empty strings in newer versions).
  • Wrap division formulas in IFERROR, e.g. =IFERROR(A2/B2,""), so blanks produce nothing rather than #DIV/0!.
  • Select a range and press Ctrl+G > Special > Blanks to quickly select all empty cells for filling or deleting in one go.
  • Conditional formatting can highlight blanks (Home > Conditional Formatting > New Rule > Format only cells that contain > Blanks) so you can see the gaps before they cause problems.
  • If a whole column is formula-driven, consider converting results to values (Copy, then Paste Special > Values) once the data is final - it removes hidden empty strings.

Troubleshooting

  • Formula still returns 0 for blank cells: check whether the cell truly is blank - press F2 on it. If it contains a space or a formula returning "", adjust your test to IF(TRIM(A2)="",...).
  • #SPILL! error from FILTER: clear the cells below and beside the formula cell, then re-enter the formula.
  • FILTER is #NAME? : your Excel version doesn't support it (pre-2021 or perpetual older versions). Use IF-based formulas or upgrade, or use the legacy array approach with Ctrl+Shift+Enter.
  • AVERAGEIF returns #DIV/0!: the range is entirely blank - there is nothing to average. Wrap it in IFERROR if that situation is expected.
  • Blanks reappear after refreshing data: the source (query, import or copy-paste) keeps sending blanks; fix the test in your formula rather than deleting rows each time.

Frequently Asked Questions

Does AVERAGE ignore blank cells automatically?

Yes. AVERAGE, SUM, MAX and MIN ignore truly empty cells. The problem arises when cells contain zeros or empty strings from formulas - those behave differently.

What's the difference between ISBLANK and =""?

ISBLANK(A2) is TRUE only for genuinely empty cells. A2="" is TRUE for empty cells and cells whose formula returns an empty string, so it's usually the safer test.

How do I ignore blanks in a VLOOKUP result?

Wrap it: =IF(VLOOKUP(A2,Sheet2!A:B,2,0)="","",VLOOKUP(A2,Sheet2!A:B,2,0)), or handle not-found with IFERROR(VLOOKUP(...),"").

Can I make a chart skip empty cells?

Yes. Right-click the chart, choose Select Data, click Hidden and Empty Cells, and pick how gaps should be shown (Gaps, Zero or Connect data points).

How do I delete all blank rows in a range?

Select the range, press Ctrl+G > Special > Blanks, then right-click one of the selected cells and choose Delete > Entire row (or Shift cells up). Save a copy first, as deleted rows cannot always be undone cleanly after saving.