Formula Errors

How to Compare Column Groups with Excel Conditional Formatting Formulas

Phi Hung VoPhi Hung Vo Nov 2, 2026 870 views

Question details

The user needs to set up a conditional formatting rule to compare cells across different column groups dynamically on a row-by-row basis.

How to Compare Column Groups Using Excel Conditional Formatting Formulas
Product
Excel
Device & OS
not provided
Scenario
Applying conditional formatting to compare values in a current column with corresponding values in a previous column (e.g., comparing D1 to B1, and F1 to D1) and continuing this pattern down the rows.
Observed behavior
When the applied formula does not correctly match the top-left cell of the selected range, Excel highlights incorrect cells across the entire row rather than evaluating each row's comparison correctly.
Before you start

Identify the exact top-left cell of the range you plan to format. Your conditional formatting formula must be written relative to this specific starting cell for Excel to evaluate the rest of the rows correctly.

Solution 1Recommended

Apply a Relative-Reference Formula for Column Comparison

Set up a conditional formatting rule using a relative cell reference (without dollar signs) mapped directly to the top-left cell of your selected target range.

Excel’s 'Manage Rules' interface only displays the formula as it applies to the top-left cell of your selected range. Because the reference is relative, Excel automatically adjusts the row and column references behind the scenes for all other cells in the range.

1
Select the Target Data Range

Highlight the entire range of cells where you want the conditional formatting applied (for example, select cells Y7:Y14).

2
Open Conditional Formatting

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

3
Enter a Relative Formula

Choose 'Use a formula to determine which cells to format'. Enter a formula comparing your active top-left cell to the target column (e.g., type =Y7<>W7). Ensure there are no '$' signs anchoring the row.

4
Apply and Save the Formatting

Click the 'Format' button, choose a fill color or font style to highlight the differences, click 'OK' to confirm the formatting, and then click 'OK' again to apply the rule.

Apply a Relative-Reference Formula for Column Comparison
Avoid Absolute References: If you mistakenly include a dollar sign (e.g., =$W$7), Excel will compare every cell in your selection strictly to row 7. This will incorrectly highlight all rows simultaneously if row 7 matches the condition.
Advanced Conditional Formatting

Easily Compare Column Groups with WPS Spreadsheet

WPS Spreadsheet provides intuitive conditional formatting tools that make comparing complex column groups straightforward. Apply relative-reference formulas just like in Excel to automatically highlight data disparities.

  1. 1. Open Your Dataset: Launch WPS Spreadsheet and open the document containing your column groups.
  2. 2. Highlight the Target Column: Select the specific cells or column group you want to format (e.g., F1:F100).
  3. 3. Create a New Rule: Click 'Conditional Formatting' under the 'Home' tab, select 'New Rule', and choose 'Use a formula to determine which cells to format'.
  4. 4. Enter the Relative Formula: Type your formula relative to the top-left cell (e.g., =F1<>D1), set your preferred fill color, and click 'OK'.
100% compatible with Microsoft Excel conditional formatting rules (.xlsx).Intuitive 'Manage Rules' interface to review top-left relative references easily.Lightweight application with fast processing for highly formatted large datasets.Free to use across multiple platforms including Windows, Mac, and Mobile.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my conditional formatting rule highlight the entire column incorrectly?

This typically happens when the formula is not based on the exact top-left cell of your selected 'Applies to' range, or if you accidentally used absolute references (like =$A$1) instead of relative references (like =A1).

Does the 'Manage Rules' window display the conditional formatting formula for every cell?

No. When you view your rule in the Conditional Formatting Rules Manager, the application only displays the formula as it applies to the very first (top-left) cell of your selected range.

How can I compare two adjacent columns and highlight the differences?

Select the second column (e.g., Column B), create a new Conditional Formatting rule using a formula, and type a relative formula comparing it to the first column (like =B1<>A1). Set a fill color to instantly spot any differences row by row.