Formatting Issues

Fix Excel Incorrectly Highlighting Long Values as Duplicates

Tauseeq MagsiTauseeq Magsi Nov 2, 2026 868 views

Question details

Users experience false positives when using the built-in Duplicate Values conditional formatting rule on long text strings.

How to Fix Excel Incorrectly Highlighting Long Values as Duplicates
Product
Microsoft Excel
Device & OS
not provided
Scenario
Applying conditional formatting to highlight duplicate entries in a dataset containing long text strings or complex identifiers.
Observed behavior
Excel incorrectly identifies distinct long text values as duplicates if they share the exact same first 15 characters and have an identical string length.
Before you start

Identify the columns containing long text strings (such as serial numbers, URLs, or complex IDs) that require accurate duplicate checking before applying custom formula solutions.

Solution 1Recommended

Use a Custom SUMPRODUCT Formula for Exact Matching

Bypass Excel's built-in 15-character limit by using a custom conditional formatting formula that evaluates the entire text string.

Because Excel's default Duplicate Values rule and standard COUNTIF function often restrict comparisons to the first 15 characters, utilizing the SUMPRODUCT function forces the calculation engine to evaluate the complete contents of the cell.

1
Select the target range

Highlight the cells containing your long text values (for example, A2:A100) where you want to check for duplicates.

2
Create a New Rule

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

3
Choose formula option

In the New Formatting Rule dialog box, select 'Use a formula to determine which cells to format'.

4
Enter the exact match formula

In the formula bar, input the formula =SUMPRODUCT(--($A$2:$A$100=A2))>1 (adjusting the cell references to match your actual data range).

5
Apply formatting style

Click the Format button, choose your desired fill color to highlight the duplicates, and click OK twice to apply the rule.

Use a Custom SUMPRODUCT Formula for Exact Matching
Performance Tip: While SUMPRODUCT is highly accurate for full-string matching, applying it to entire columns (e.g., A:A) can slow down workbook performance. Always restrict the formula range to your actual data.
Advanced Data Formatting

Accurately Highlight Duplicates with WPS Spreadsheet

WPS Office provides robust conditional formatting and advanced formula capabilities, allowing you to bypass strict evaluation limits and accurately manage massive datasets without freezing or crashing.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the document containing your long text data.
  2. 2. Select the data range: Highlight the specific column or cells you need to check for duplicates.
  3. 3. Access Conditional Formatting: Navigate to the Home tab, click on Conditional Formatting, and choose New Rule.
  4. 4. Apply custom formula: Select the formula option and input =SUMPRODUCT(--($A$1:$A$100=A1))>1 to enforce a full-string comparison.
  5. 5. Set color and save: Click Format to choose a highlight color, then click OK to immediately identify true duplicates.
Fully compatible with Microsoft Excel file formats (.xlsx, .xls)Supports advanced array formulas like SUMPRODUCT for exact text matchingLightweight architecture ensures fast performance even with massive datasets containing long stringsFamiliar user interface requires no learning curve to apply custom formatting rules
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel only check the first 15 characters for duplicates?

Excel's calculation engine limits numeric precision to 15 significant digits based on the IEEE 754 specification. To optimize processing performance, certain built-in features, including the Duplicate Values conditional formatting rule, apply a similar 15-character evaluation limit to text strings.

Does the COUNTIF function have the same 15-character limit?

Yes, depending on the Excel version and data type, functions like COUNTIF and SUMIF may also truncate text evaluations to 15 characters when handling numeric-like strings, or max out at 255 characters. Using SUMPRODUCT or the EXACT function circumvents this.

Can I use a helper column instead of conditional formatting?

Absolutely. You can create a helper column adjacent to your data and enter the formula =SUMPRODUCT(--($A$2:$A$100=A2))>1. This will output TRUE for actual duplicates, allowing you to easily filter, sort, or delete the identified rows without relying on conditional formatting colors.