Use Excel FILTER to Exclude Specific Text and Blank Cells
Question details
Extract values from column D while excluding specified labels 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.
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.
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.
Click an empty cell outside D2:D9, with enough empty cells below it for the filtered results.
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.
In the formula bar, replace every instance of D2:D9 with your actual source range, then press Enter. Keep all ranges the same size.

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. Open your workbook: Open WPS Spreadsheets and select Open to load your Excel workbook.
- 2. Choose an output cell: Click an empty cell outside the source range, leaving room below it for the results.
- 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. Save the workbook: Select File > Save As and choose an Excel workbook format if you need an XLSX file.

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.




