Formatting Issues

How to Highlight Differences Between Data Columns in Excel

Elise WilliamsElise Williams Oct 23, 2026 869 views

Question details

The user needs a way to visually flag discrepancies between two specific sets of columns by automatically changing the cell color when values do not match.

How to Highlight Differences Between Data Columns in Excel
Product
Excel
Device & OS
not provided
Scenario
Comparing pairs of columns in the same worksheet (such as provider codes and RVUs in columns A and B against auditor values in columns I and J) to easily spot mismatches.
Observed behavior
Cells in the primary dataset should automatically turn red whenever their values differ from the corresponding cells in the secondary dataset.
Before you start

Ensure your two datasets are aligned in the same rows before applying formatting, and make note of the exact starting row number of your selection to guarantee the formula references work accurately.

Solution 1Recommended

Use Conditional Formatting with a Custom OR Formula

By using a logical OR formula within conditional formatting, you can evaluate multiple column comparisons at once and apply a highlight only when a mismatch is found.

This method uses relative row references and absolute column references, allowing Excel to check each row individually while keeping the comparison locked to the specific columns you defined.

1
Select the Target Range

Highlight the cells you want to change color. For example, click and drag to select your provider data in columns A and B (e.g., A2:B100).

2
Open Conditional Formatting

Navigate to the 'Home' tab on the ribbon, click on 'Conditional Formatting' in the Styles group, and select 'New Rule'.

3
Enter the Comparison Formula

Choose 'Use a formula to determine which cells to format'. In the formula box, enter your comparison logic. For comparing A and B against I and J starting at row 2, type: =OR($A2<>$I2,$B2<>$J2).

4
Set the Highlight Color

Click the 'Format' button, go to the 'Fill' tab, and choose the color red. Click 'OK' twice to apply the rule to your data.

Use Conditional Formatting with a Custom OR Formula
Row Number Alignment: It is crucial that the row number in your formula (e.g., $A2) exactly matches the very first row of the range you selected before opening the Conditional Formatting menu.
Efficient Data Comparison

Highlight Data Differences Automatically in WPS Spreadsheet

WPS Spreadsheet fully supports advanced conditional formatting formulas, allowing you to easily compare lists, highlight discrepancies, and audit your data without hassle. It provides a familiar interface so you can apply these formatting rules exactly as you would in Microsoft Excel.

  1. 1. Select your data: Open your workbook in WPS Spreadsheet and select the primary columns you wish to highlight (e.g., A2:B50).
  2. 2. Access Conditional Formatting: Go to the 'Home' tab, click 'Conditional Formatting', and choose 'New Rule' from the drop-down menu.
  3. 3. Apply the Formula: Select the option to use a formula. Input your comparison logic, such as =OR($A2<>$I2,$B2<>$J2).
  4. 4. Format and Save: Click 'Format', pick your preferred highlight color under the 'Patterns' or 'Fill' tab, and click 'OK' to instantly view the differences.
Seamlessly compare multiple columns using standard conditional formatting formulasFully compatible with Microsoft Excel formatting rules and xlsx file formatsLightweight and fast, ensuring smooth performance even with large datasets
microsoft office alternative - wps office

Frequently Asked Questions

Why is my conditional formatting highlighting the wrong rows?

This usually happens if the row number in your formula does not match the active cell of your selection. If you highlighted A2:B100, your formula must reference row 2 (e.g., $A2). If you accidentally reference row 1, the formatting will be offset by one row.

Can I highlight the entire row instead of just the specific columns?

Yes. To highlight the entire row, select your entire data table (e.g., A2:J100) before creating the rule. Use the exact same formula: =OR($A2<>$I2,$B2<>$J2). Because the columns have dollar signs ($A, $I), the entire row will look at those specific columns to decide whether to turn red.

How do I compare values that are located on a different worksheet?

You can modify your formula to include the sheet name. For example, if you are comparing column A on 'Sheet1' to column A on 'Sheet2', select column A on Sheet1 and use the formula: =$A2<>Sheet2!$A2. Ensure both sheets are sorted identically for the row-by-row comparison to be accurate.