How to Highlight Cells with Matching Absolute Values in Excel
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.

- 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.
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.
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).
Highlight your dataset, for example, cells A2:A14. Ensure A2 is the active cell in your selection.
Navigate to the Home tab on the Excel ribbon, click on 'Conditional Formatting', and select 'New Rule' from the dropdown menu.
Choose 'Use a formula to determine which cells to format' and enter the formula: =COUNTIF($A$2:$A$14,-A2)>0
Click the 'Format' button, go to the Fill tab, select a highlight color, and click 'OK' twice to apply the rule.

Highlight Any Combination of Equal Absolute Values
Use an expanded formula to highlight any cells sharing an absolute value, whether they have the same or opposite signs.
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. Open your dataset: Launch WPS Spreadsheet and select the data column containing the numbers you wish to analyze.
- 2. Access conditional formatting: Click on 'Conditional Formatting' under the Home tab and choose 'New Rule' from the menu.
- 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.

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'.




