Function Problems

Use Excel Advanced Filter to Find Nonblank Values with OR Logic

Elise WilliamsElise Williams Dec 2, 2026 868 views

Question details

Find rows where either of two columns contains a value using Excel Advanced Filter.

Use Excel Advanced Filter to Find Nonblank Values with OR Logic
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.
Before you start

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.

Solution 1Recommended

Set up separate Advanced Filter criteria rows for nonblank values

Use this method to return records where either of two columns is nonblank.

1
Create the criteria headers

In an empty area of the worksheet, copy the two target column headers into adjacent cells. The headers must match the source table headers.

2
Enter the OR criteria

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.

3
Open Advanced Filter

Click anywhere in the source table, then select Data > Advanced in the Sort & Filter group.

4
Apply the filter

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.

Set up separate Advanced Filter criteria rows for nonblank values
Why separate rows matter: Criteria on separate rows use OR logic. Putting both <> criteria on the same row would require both columns to be nonblank.
Filter data with WPS Spreadsheet

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. 1. Open the workbook: Open WPS Spreadsheet and select File > Open to choose your workbook.
  2. 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. 3. Open Advanced Filter: Select a cell in the source table and choose Data > Advanced Filter.
  4. 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.
Apply OR logic with separate Advanced Filter criteria rowsOpen and edit Microsoft Excel XLSX and XLS filesWork with spreadsheet data in a familiar interface
microsoft office alternative - wps office

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.