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. Dynamic arrays
  3. Filter Out Blanks in Excel With the FILTER Function

Filter Out Blanks in Excel With the FILTER Function

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

The short answer

To filter out blanks in Excel, use FILTER with a not-empty test: =FILTER(A2:A10,A2:A10<>""). The condition A2:A10<>"" is TRUE for every cell that holds something, so only those cells spill into the result. For whole rows, filter a wider range on one column. FILTER needs Excel 2021 or Microsoft 365.

Key takeaways

  • =FILTER(A2:A10,A2:A10<>"") returns every non-empty cell and skips the blanks.
  • To keep rows where several columns are filled, multiply the tests; to keep rows where any column is filled, add them.
  • Cells that hold only a space look blank but are not. Test LEN(TRIM(range))>0 to catch them.
  • FILTER shows 0 for blank cells in the returned columns. Wrap the range in IF(range="","",range) to keep them empty.
On this page+
  1. The formula to filter out blanks in Excel
  2. Filter out blanks from one column
  3. Filter out rows where one column is blank
  4. Filter out rows that are completely blank, or not complete
  5. Why do blank-looking cells still show up?
  6. How to stop FILTER showing 0 for blank cells
  7. What if every cell is blank? Fixing #CALC!
  8. Practise it

To filter out blanks in Excel, give the FILTER function a "not empty" test: =FILTER(A2:A10,A2:A10<>""). Every cell that holds something spills into the result, and the empty ones are skipped. This guide shows the formula for one column and for whole rows, plus the three things that trip people up: cells with hidden spaces, stray zeros and the #CALC! error.

The formula to filter out blanks in Excel#

FILTER returns the rows of a range that pass a test. To skip blanks, the test is "this cell is not equal to empty text":

Excel formula
=FILTER(array, include, [if_empty])
=FILTER(A2:A10,A2:A10<>"")
PartWhat it means
A2:A10 (array)The cells to return
A2:A10<>"" (include)TRUE for each cell that is not empty
[if_empty]Optional: what to show if nothing passes

The <> sign means "not equal to", and "" is empty text. So A2:A10<>"" gives a list of TRUE and FALSE values, one per cell, and FILTER keeps the TRUE ones.

FILTER needs Excel 2021, Excel 2024 or Microsoft 365. You type it in one cell and the results spill into the cells below. If those cells are not empty, you get #SPILL! instead, so leave room. The FILTER function in Excel covers the function in general.

Filter out blanks from one column#

Here is a volunteer list with gaps in A1:B8:

AB
1VolunteerShift
2AmaraMorning
3
4LuisEvening
5Grace
6Morning
7TomasEvening
8

In D2, type:

Excel formula
=FILTER(A2:A8,A2:A8<>"")

The result spills into D2:D5: Amara, Luis, Grace, Tomas. Add a name to A3 and it appears in the list at once, which is the big advantage over deleting rows by hand.

To count the names instead of listing them, use =COUNTA(FILTER(A2:A8,A2:A8<>"")), which returns 4. To sort them, wrap the formula in SORT: =SORT(FILTER(A2:A8,A2:A8<>"")).

FILTER is also the fix for a common UNIQUE problem. If you run =UNIQUE(A2:A8) on a column with gaps, the empty cells come back as a 0 in the list. Remove the blanks first and the 0 disappears:

Excel formula
=UNIQUE(FILTER(A2:A8,A2:A8<>""))

Filter out rows where one column is blank#

Return several columns but test only one, and you remove every row where that column is empty. To list the volunteers with their shifts, skipping rows with no name:

Excel formula
=FILTER(A2:B8,A2:A8<>"")

This spills a two-column result: Amara/Morning, Luis/Evening, Grace/0, Tomas/Evening. Row 6 is gone because its name is blank, even though it has a shift.

Notice Grace/0. Grace has no shift, and FILTER returns an empty cell as 0. The fix is in the section on stray zeros below.

Filter out rows that are completely blank, or not complete#

You can test several columns at once. In FILTER conditions, * works like AND and + works like OR. For a deeper look, see FILTER with multiple criteria.

Keep rows where any column has something (drop only the fully empty rows):

Excel formula
=FILTER(A2:B8,(A2:A8<>"")+(B2:B8<>""))

This keeps rows 2, 4, 5, 6 and 7. Only rows 3 and 8 are fully empty, so only they are removed.

Keep rows where every column is filled (drop any row with a gap):

Excel formula
=FILTER(A2:B8,(A2:A8<>"")*(B2:B8<>""))

This keeps only Amara, Luis and Tomas. Grace has no shift and row 6 has no name, so both drop out. Put each test in its own brackets, or Excel works out the comparison in the wrong order.

Why do blank-looking cells still show up?#

A cell that holds a space, or text copied from another system, looks empty but is not. A2:A8<>"" treats it as filled, so it appears in your result as an empty-looking row.

Use TRIM to remove spaces and LEN to count what is left:

Excel formula
=FILTER(A2:A8,LEN(TRIM(A2:A8))>0)

Now a cell with only spaces has a length of 0 after TRIM, so it is filtered out. TRIM does not remove the non-breaking space that web pages often use. If those are in your data, use SUBSTITUTE(A2:A8,CHAR(160),"") inside the TRIM as well.

You may be tempted to use ISBLANK, as in =FILTER(A2:A8,NOT(ISBLANK(A2:A8))). That works for truly empty cells, but ISBLANK returns FALSE for a formula that shows "", so those cells are kept. The <>"" test treats both the same way, which is usually what you want. The guide to ISBLANK, ISNUMBER and the other IS functions explains the difference, and the IS functions lesson lets you test it.

How to stop FILTER showing 0 for blank cells#

FILTER copies values, and the value of an empty cell is 0. Replace empty cells with empty text before filtering:

Excel formula
=FILTER(IF(A2:B8="","",A2:B8),A2:A8<>"")

The IF checks every cell in A2:B8. Empty cells become "" and the rest stay as they are. Now Grace's row shows an empty Shift instead of 0.

A custom number format such as 0;-0;;@ also hides zeros, but only on screen. The IF method changes the values, so a COUNTIF on the result counts correctly.

What if every cell is blank? Fixing #CALC!#

When no cell passes the test, FILTER has nothing to return and shows #CALC!. Use the third argument to show a message instead:

Excel formula
=FILTER(A2:A8,A2:A8<>"","No names yet")

The guide to fixing the #CALC! error covers the other causes.

If you don't have FILTER, you can still hide blanks. Click the filter arrow on the column header (Data > Filter) and untick (Blanks). To remove empty rows for good, select the column, press F5 (Mac: Ctrl+G), choose Special > Blanks and delete the rows. The guide on how to delete blank rows in Excel walks through it safely.

Practise it#

Try the exercise on this page: one FILTER formula removes the gaps from the volunteer list. Then practise the FILTER function in a live spreadsheet, where you type each formula and it checks it instantly. The FILTER function guide is a quick reference for the syntax when you need it.

Try it yourself

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

Some volunteers have not signed up for a shift yet, so the list has gaps. In D2, use FILTER to list only the names in A2:A8 that are not blank.

fx
ABCDE
1
Volunteer
Shift
Names
2
Amara
Morning
3
4
Luis
Evening
5
Grace
6
Morning
7
Tomas
Evening
8
9
10

Tip: The first part is the range to return, A2:A8. The second part is the test: A2:A8<>"" means not empty.

Practise this in a lesson

LessonFILTER: pull matching rows with a formulaReturn every row that meets one or more conditions with FILTER, and show a friendly message when nothing matches.LessonIS functions and SWITCHCheck what's really in a cell with ISBLANK, ISNUMBER and ISTEXT, and turn short codes into labels with SWITCH.Function guideFILTERReturn every row that matches a condition with Excel's FILTER. Multiple criteria, empty results and #SPILL! explained, with live practice.

Frequently asked questions

How do I filter out blank cells in Excel?

+

Use =FILTER(A2:A10,A2:A10<>""). It returns only the cells that are not empty, and the list updates when the data changes. In older Excel, use the filter arrow on the column and untick (Blanks) instead.

How do I use FILTER to exclude blank rows across several columns?

+

Add the not-empty tests together: =FILTER(A2:C10,(A2:A10<>"")+(B2:B10<>"")+(C2:C10<>"")). A row is kept if at least one of its cells has something in it.

Why does FILTER show 0 instead of a blank?

+

FILTER returns the value of an empty cell as 0. Use =FILTER(IF(A2:C10="","",A2:C10),A2:A10<>"") so empty cells come back as empty text instead.

Why does my FILTER still show cells that look blank?

+

Those cells probably contain a space or another invisible character. Use LEN(TRIM(A2:A10))>0 as the condition so cells with only spaces are treated as blank.

Does FILTER work in Excel 2016 or 2019?

+

No. FILTER needs Excel 2021, Excel 2024 or Microsoft 365. In older versions, use AutoFilter and untick (Blanks), or delete the blank rows with Go To Special.

Sources

  • FILTER function - Microsoft Support
  • Dynamic array formulas and spilled array behavior - 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. The formula to filter out blanks in Excel
  2. Filter out blanks from one column
  3. Filter out rows where one column is blank
  4. Filter out rows that are completely blank, or not complete
  5. Why do blank-looking cells still show up?
  6. How to stop FILTER showing 0 for blank cells
  7. What if every cell is blank? Fixing #CALC!
  8. Practise it

Keep reading

Dynamic arrays· 6 min read

The FILTER Function in Excel (With AND and OR)

FILTER returns every row of a range that passes a test: =FILTER(A2:C9,B2:B9="East"). The matching rows spill into the cells below and update when the data changes. For AND, multiply tests in brackets; for OR, add them. The third argument shows a message when nothing matches. FILTER needs Excel 2021, Excel 2024 or Microsoft 365.

Dynamic arrays· 6 min read

FILTER With Multiple Criteria: AND and OR

To use the FILTER function with multiple criteria, put each condition in brackets and combine them. Multiply for AND: =FILTER(A2:D8,(B2:B8="East")*(C2:C8="Laptop")). Add for OR: =FILTER(A2:D8,(B2:B8="East")+(B2:B8="West")). Mix them with extra brackets. Don't use the AND and OR functions inside FILTER, because they return one result, not one per row.

Productivity· 6 min read

How to Delete Blank Rows in Excel Safely

The safest way to delete blank rows in Excel is to filter. Turn on filters with Ctrl+Shift+L (Mac: ⌘⇧F), show only (Blanks) in a column that is always filled, select the visible rows and delete them with Ctrl+- (Mac: ⌘-). Then clear the filter. Avoid deleting every row that has any blank cell, because that removes real data too.

More on dynamic arrays

  • FILTER Specific Columns in Excel (Not the Whole Row)
  • UNIQUE With Criteria: List Distinct Values That Match
  • LAMBDA Function in Excel: Write Your Own Functions
  • LET Function in Excel: Name the Parts of a Formula
  • List All Matching Values in One Cell
  • How to Randomize a List in Excel With SORTBY
All dynamic arrays 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