Filter Excel Rows Where One Column Is Greater Than Another
Question details
Display rows where the number in column M is greater than the number in column N on the same row.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Compare values in two columns and show only rows that meet the greater-than condition.
- Observed behavior
- The desired result is a list of rows where each column M value is greater than its corresponding column N value.
Check that columns M and N contain numeric values and identify your header and data rows. The examples below assume headers are in row 1 and data starts in row 2.
Use a helper column to filter the original Excel rows
Use this method to filter the existing worksheet without creating a separate results list.
Enter a header such as Match in cell O1, or choose another empty column next to your data.
In cell O2, enter =IF(M2>N2,"FILTER","") and press Enter.
Drag the fill handle from O2 down through the last data row so each row compares its own M and N values.
Select the data range including column O, then choose Data > Filter. Open the filter arrow in O1 and select only FILTER.

Return matching rows with Excel's FILTER function
Use this method in Excel 365 to create a separate, dynamically updated list of matching rows.
Filter rows by comparing columns in WPS Spreadsheets
Use a helper formula and the Filter command in WPS Spreadsheets to show rows where column M is greater than column N.
- 1. Open the spreadsheet: Open your workbook in WPS Spreadsheets and confirm that the data starts in row 2.
- 2. Add a helper column: Enter Match in O1, then enter =IF(M2>N2,"FILTER","") in O2.
- 3. Fill the formula: Drag the fill handle from O2 down to the last row of your data.
- 4. Apply the filter: Select the data range including column O, choose Data > Filter, and use the O1 filter arrow to select FILTER.

Frequently Asked Questions
Can I use a helper column other than O?
Yes. Enter the helper header and formula in any empty column, copy the formula down, and include that column in the range selected for Data > Filter.
How do I include rows where the two values are equal?
Use >= instead of >. For example, enter =IF(M2>=N2,"FILTER","") in the helper column and filter for FILTER.
Why does the FILTER formula show a spill error?
The output range may contain existing data. Clear the cells below and to the right of the formula, or move the formula to a larger empty area.
Does the helper-column filter update when values change?
The helper formulas recalculate when their inputs change, but you may need to reapply the filter using Data > Reapply to update which rows are visible.




