Make Excel FILTER and ROWS Return Blank Instead of 1
Question details
Return a blank result when an Excel FILTER formula finds no matching records instead of counting the no-match message as one row.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A formula filters a table by origin, year, and nonblank items, then counts unique results with ROWS.
- Observed behavior
- FILTER returns the text "No data" when there are no matches, and ROWS counts that text as one row.
Check that your Excel version supports FILTER, UNIQUE, and LET. Confirm that the TRegistos table has Item, Origem, and Data columns, and that Data contains valid Excel dates.
Check the FILTER result before counting unique items
Use this formula to return a blank for an empty input or no matches and count unique items otherwise.
FILTER's empty-string fallback is still a one-row result, so ROWS alone would return 1. The formula checks for that fallback before counting.
In Excel, click the cell containing the existing FILTER and ROWS formula.
In the formula bar, enter: =IF(OR($C$8="No data",$C$8=""),"",LET(result,FILTER(TRegistos[Item],(TRegistos[Origem]=$C$8)*(YEAR(TRegistos[Data])=$G$2)*(TRegistos[Item]<>"")*(TRegistos[Item]<>0),""),IF(AND(ROWS(result)=1,INDEX(result,1,1)=""),"",ROWS(UNIQUE(result)))))
Press Enter, then change C8 or G2 to test a matching and a nonmatching selection. The cell should be blank when no records match.

Return blank instead of zero when summing filtered values
Use the same empty-result check when you want to sum a numeric filtered column rather than count unique items.
Check filtered results in WPS Spreadsheets
Open your workbook in WPS Spreadsheets and use the same empty-result check to avoid counting a no-match fallback. Your WPS version must support the formula functions and table references used.
- 1. Open the workbook: In WPS Office, open WPS Spreadsheets and select Open to choose your Excel workbook.
- 2. Check formula support: Select an empty cell and test FILTER, UNIQUE, and LET with your data. Also check that your version recognizes the workbook's structured table references.
- 3. Enter the formula: Select the result cell and enter the recommended FILTER and ROWS formula in the formula bar, adjusting its references to match your workbook.
- 4. Test and save: Test matching and nonmatching criteria, then select Save to retain the changes in your XLSX file.

Frequently Asked Questions
Why does ROWS return 1 when FILTER finds no matches?
FILTER returns its if_empty value as a single result. If that value is "No data" or an empty string, ROWS still sees one row unless you check for the fallback first.
Will an empty string in FILTER automatically make ROWS return blank?
No. Use FILTER's empty-string fallback and test it before applying ROWS, as in the recommended LET formula.
What happens if C8 is blank or contains "No data"?
The outer IF checks C8 first and returns an empty string without counting filtered results.
Can I use the formula if my Item column contains text?
The unique-count formula can count text items. The SUM version is for numeric values; SUM does not add text items.




