Function Problems

Use Excel FILTER to Exclude Specific Text and Blank Cells

John WilsonJohn Wilson Nov 18, 2026 868 views

Question details

Extract values from column D while excluding specified labels and blank cells.

Use Excel FILTER to Exclude Specific Text and Blank Cells
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants to filter D2:D9 and omit the labels HOST and Refer to Blocking.
Observed behavior
The desired result is a list containing only nonblank values that do not match either excluded label.
Before you start

Check that your Excel version supports FILTER and confirm the source range and labels to exclude. Choose an empty cell with enough room below it for the results to spill.

Solution 1Recommended

Combine FILTER conditions to exclude labels and blanks

Use exact comparisons when specific labels and blank cells must be omitted.

Multiplying the conditions creates an AND test: a value is returned only when it meets all three conditions. The text comparisons exclude whole-cell matches, not cells that merely contain the labels as part of longer text.

1
Select an output cell

Click an empty cell outside D2:D9, with enough empty cells below it for the filtered results.

2
Enter the FILTER formula

In the selected cell or the formula bar, enter =FILTER(D2:D9,(D2:D9<>"HOST")*(D2:D9<>"Refer to Blocking")*(D2:D9<>"")) and press Enter.

3
Adjust the range if needed

In the formula bar, replace every instance of D2:D9 with your actual source range, then press Enter. Keep all ranges the same size.

Combine FILTER conditions to exclude labels and blanks
Check for spaces: Cells containing only spaces are not blank, and extra spaces in a label can prevent an exact match. Clean the source values if those cells should also be excluded.
Filter spreadsheet values

Filter unwanted labels in WPS Spreadsheets

In a WPS Spreadsheets version that supports FILTER, use the same multiple-condition formula to extract values while excluding specified labels and blanks.

  1. 1. Open your workbook: Open WPS Spreadsheets and select Open to load your Excel workbook.
  2. 2. Choose an output cell: Click an empty cell outside the source range, leaving room below it for the results.
  3. 3. Enter the formula: In the selected cell, enter =FILTER(D2:D9,(D2:D9<>"HOST")*(D2:D9<>"Refer to Blocking")*(D2:D9<>"")) and press Enter.
  4. 4. Save the workbook: Select File > Save As and choose an Excel workbook format if you need an XLSX file.
Exclude multiple labels and blank cells in one formulaOpen and edit Microsoft Excel XLSX filesWork in a familiar spreadsheet interfaceUse WPS Office free
microsoft office alternative - wps office

Frequently Asked Questions

How do I exclude another label from the results?

Add another multiplied condition inside FILTER, such as *(D2:D9<>"New label"), using the same source range.

Why does Excel show a #SPILL! error?

FILTER needs empty cells for its results. Clear any entries blocking the output area, or move the formula to an empty location.

What happens if no values match the conditions?

Excel can return a #CALC! error. Add an optional third argument, such as "No matches", after the conditions to display a message instead.

Can I use LEN instead of checking each label?

You can use =FILTER(D2:D9,LEN(D2:D9)>4) to keep text longer than four characters, but it does not specifically exclude the two labels and may remove wanted short values.

Does the formula exclude cells containing HOST within longer text?

No. The comparison D2:D9<>"HOST" excludes whole-cell matches only. A cell containing a longer value such as HOST server can still appear.