Formatting Issues

How to Highlight Cells with Matching Absolute Values in Excel

Emma BrownEmma Brown Oct 26, 2026 868 views

Question details

The user needs to find and highlight cells within a column that share the same absolute value, such as matching a positive number with its exact negative counterpart.

How to Highlight Cells with Matching Absolute Values in Excel
Product
Excel
Device & OS
not provided
Scenario
Analyzing a financial or numerical dataset where exact opposite values or identical absolute values need to be identified visually.
Observed behavior
The goal is to apply a conditional formatting rule that evaluates absolute values and automatically highlights matching pairs across the selected data range.
Before you start

Ensure your data is organized in a single column or identifiable range, and take note of the starting cell reference (e.g., A2), as this will be required for the formatting formula.

Solution 1Recommended

Use a Formula to Match Opposite Values

Apply a COUNTIF formula within Conditional Formatting to find and highlight exactly matching positive and negative pairs.

This method specifically targets cells where the active cell has a corresponding inverse value within the same range (e.g., finding a -5 for a 5).

1
Select the data range

Highlight your dataset, for example, cells A2:A14. Ensure A2 is the active cell in your selection.

2
Open Conditional Formatting

Navigate to the Home tab on the Excel ribbon, click on 'Conditional Formatting', and select 'New Rule' from the dropdown menu.

3
Enter the evaluation formula

Choose 'Use a formula to determine which cells to format' and enter the formula: =COUNTIF($A$2:$A$14,-A2)>0

4
Apply formatting color

Click the 'Format' button, go to the Fill tab, select a highlight color, and click 'OK' twice to apply the rule.

Use a Formula to Match Opposite Values
Check Your Range: Make sure the absolute references in the formula ($A$2:$A$14) match your selected data range perfectly, while the criteria reference (-A2) remains relative.
Seamless Data Analysis with WPS Office

Easily Highlight Absolute Values Using WPS Spreadsheet

WPS Spreadsheet fully supports advanced conditional formatting formulas, allowing you to seamlessly analyze data and highlight matching absolute values just as you would in Microsoft Excel.

  1. 1. Open your dataset: Launch WPS Spreadsheet and select the data column containing the numbers you wish to analyze.
  2. 2. Access conditional formatting: Click on 'Conditional Formatting' under the Home tab and choose 'New Rule' from the menu.
  3. 3. Apply the matching formula: Select 'Use a formula...', input =COUNTIF($A$2:$A$14,-A2)>0, set a distinctive format color, and click OK to highlight the values.
100% compatibility with Microsoft Excel formulas and conditional formatting features.Free, lightweight, and fast-loading spreadsheet application.Intuitive user interface for quick data analysis, styling, and dataset management.
QA img-9

Frequently Asked Questions

Why is my conditional formatting formula highlighting the wrong cells?

This usually happens if the relative cell reference in your formula (such as A2) does not perfectly match the active, top-left cell of your selected data range. Ensure the formula points exactly to the first cell you highlighted.

Can I highlight matching absolute values across multiple different columns?

Yes. You can modify the COUNTIF range to cover multiple columns (for example, $A$2:$C$14) while keeping the relative reference for the active cell (like -A2) to evaluate the entire highlighted array.

How do I remove the conditional formatting once it is applied?

Select the highlighted data range, navigate to the Home tab, click on 'Conditional Formatting', choose 'Clear Rules', and then click 'Clear Rules from Selected Cells'.