Fix Incorrect Excel Conditional Formatting for Row Comparisons
Question details
User needs to correct a conditional formatting rule that incorrectly highlights cells when comparing formula results in one column to values in another.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Setting up a conditional formatting rule to compare formula results in column J with static values in column E to trigger highlights row by row.
- Observed behavior
- The conditional formatting highlights cells incorrectly, often applying the format to the wrong rows due to reference mismatch or hidden data differences.
Before modifying your conditional formatting rules, clear any overlapping rules in the target column and verify that both columns contain the same data type (e.g., both are numeric values).
Use Relative Cell References for the Highlight Rule
Ensure the formula uses relative cell references and matches the active cell selected during rule creation so it adjusts properly for every row.
When applying conditional formatting to an entire column based on another column, the formula must be relative to the active cell in your selection. If absolute references (with $ signs) are used, Excel will compare every cell in the selected range to a single fixed row, causing incorrect highlights across the board.
Highlight the entire column J by clicking the column header. Ensure that J1 is the active cell (it will appear slightly lighter than the rest of the highlighted selection).
Navigate to the Home tab on the top ribbon, click on Conditional Formatting, and select New Rule from the dropdown menu.
Choose 'Use a formula to determine which cells to format'. In the formula box, type =J1>E1 (ensure there are no dollar signs). This tells Excel to compare each row relatively.
Click the Format button, choose your desired highlight color under the Fill tab, and click OK twice to apply the rule.

Check for Hidden Decimals and Rounding Errors
Fix highlighting discrepancies caused by minor unseen decimal differences between formula results and static values.
Accurately Compare Row Data in WPS Spreadsheet
WPS Spreadsheet offers a highly intuitive conditional formatting tool that perfectly supports cross-column row comparisons, making it easy to identify data trends and anomalies without reference errors.
- 1. Open your workbook in WPS Spreadsheet: Launch WPS Office, open your spreadsheet, and highlight the column you want to format (e.g., Column J), ensuring the first row is the active cell.
- 2. Access Conditional Formatting: Go to the Home tab, click on Conditional Formatting, and select New Rule.
- 3. Set up the formula comparison: Select 'Use a formula to determine which cells to format', and input your relative reference formula, such as =J1>E1.
- 4. Customize and apply: Click the Format button to choose your highlight color, then click OK to accurately apply the rule to your data.

Frequently Asked Questions
Why does my conditional formatting highlight the wrong rows when comparing columns?
This typically occurs if you used absolute cell references (e.g., =$J$1>$E$1). Absolute references lock the comparison to a single cell for the entire range. Change your formula to use relative references (e.g., =J1>E1) so the rule adjusts automatically row by row.
How do I compare text strings instead of numbers with conditional formatting?
To perform a case-sensitive text comparison in your formatting rule, use the EXACT function: =EXACT(J1, E1). If you only want to check if the text matches regardless of case, a standard equals sign will work: =J1=E1.
Can I apply conditional formatting to an entire row based on a comparison between two columns?
Yes. Select the entire range of rows you want to highlight. In your conditional formatting formula, lock the column references with a dollar sign but leave the row references relative (e.g., =$J1>$E1). This applies the highlight across the full row based on the logic of those specific columns.




