Use Excel Advanced Filter to Find Nonblank Values with OR Logic
Question details
Find rows where either of two columns contains a value using Excel Advanced Filter.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user wants to filter a table using nonblank criteria joined by OR logic.
- Observed behavior
- The desired result includes a row when either or both of the specified columns contain a value.
Make sure your data has column headers, and identify the two columns you want to check. Reserve a separate range on the worksheet for the criteria, with room for the headers and two criteria rows.
Set up separate Advanced Filter criteria rows for nonblank values
Use this method to return records where either of two columns is nonblank.
In an empty area of the worksheet, copy the two target column headers into adjacent cells. The headers must match the source table headers.
Under the first header, enter <> in the first criteria row and leave the adjacent cell blank. In the next row, leave the first cell blank and enter <> under the second header.
Click anywhere in the source table, then select Data > Advanced in the Sort & Filter group.
Confirm the List range includes the table headers and data. Set the Criteria range to the two criteria headers and both criteria rows, choose Filter the list, in-place, and click OK.

Find nonblank values with OR criteria in WPS Spreadsheet
Use Advanced Filter in WPS Spreadsheet to return rows where either of two columns contains a value.
- 1. Open the workbook: Open WPS Spreadsheet and select File > Open to choose your workbook.
- 2. Build the criteria range: Copy the two target column headers to an empty worksheet area. Enter <> under the first header on one row and under the second header on the next row, leaving the other criteria cells blank.
- 3. Open Advanced Filter: Select a cell in the source table and choose Data > Advanced Filter.
- 4. Apply the criteria: Set the list range to the table and the criteria range to the headers plus both criteria rows. Choose to filter the list in place and confirm.

Frequently Asked Questions
What does <> mean in Advanced Filter criteria?
The <> operator means not equal to. When entered by itself under a column header in the criteria range, it is used to match nonblank cells in that column.
Why are only rows with both columns filled appearing?
Check the criteria range: placing both <> conditions on the same row applies AND logic. Move one condition to a separate criteria row to apply OR logic.
Can I copy the filtered results to another location?
Yes. In Excel, select Data > Advanced, choose Copy to another location, and specify a destination in the Copy to box before clicking OK.
Do the criteria headers have to match the table headers?
Yes. Copy the relevant headers from the source table into the criteria range so Excel can apply each condition to the intended column.




