logo
search
Formula Errors

How to Find Duplicate Excel Cells Longer Than 255 Characters

Olivia MillerOlivia Miller Oct 9, 2026 871 views

Question details

The user needs to find duplicate text strings that exceed 255 characters in Excel because standard duplicate-checking formulas are failing.

How to Find Duplicate Excel Cells Longer Than 255 Characters
Product
Excel
Device & OS
not provided
Scenario
Comparing data within a large dataset to identify duplicate text entries where cell contents are extremely long.
Observed behavior
Using the COUNTIF function to compare duplicate text strings longer than 255 characters returns a #VALUE! error.
Before you start

Identify the specific target cell you want to check for duplicates and determine the exact data range you need to compare it against.

Solution 1Recommended

Use an EXACT Array Formula to Count Duplicates

Bypass the 255-character limit of COUNTIF by combining the SUM and EXACT functions inside an array formula.

The COUNTIF function has a known limitation in Excel where it cannot process text strings longer than 255 characters, resulting in a #VALUE! error. The EXACT function, however, can compare text strings of any length. By wrapping EXACT inside a SUM function as an array formula, you can check an entire range of data at once for exact matches.

1
Select an output cell

Click on a blank cell where you want the total count of duplicates to appear.

2
Enter the array formula

Type the formula =SUM(--(EXACT(T1232, T2:T5000))) into the formula bar. Replace 'T1232' with the cell containing your long text, and 'T2:T5000' with your actual data range.

3
Confirm as an array formula

Do not just press Enter. Instead, press Ctrl+Shift+Enter simultaneously on your keyboard. Curly braces {} will automatically appear around the formula, indicating it is calculating as an array.

Performance Tip: Avoid using entire column references (such as T:T) within array formulas. Checking over a million rows will significantly slow down your workbook's performance.
Advanced Formula Support

Use WPS Spreadsheet to Handle Complex Formulas and Long Text

WPS Spreadsheet fully supports advanced array formulas like EXACT and SUM, allowing you to seamlessly process complex data, find long text duplicates, and manage large datasets efficiently.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the document containing your long text data.
  2. 2. Input the exact formula: Select a blank cell and enter =SUM(--(EXACT(target_cell, data_range))).
  3. 3. Calculate the array: Press Ctrl+Shift+Enter to execute the array formula and instantly find your duplicates.
Fully compatible with Microsoft Excel formulas and array functionsEfficiently handles large datasets and long text strings without laggingFree, lightweight, and features an easy-to-use interfaceSupports seamless .xlsx format compatibility for easy sharing
microsoft office alternative - wps office

Frequently Asked Questions

Why does COUNTIF return #VALUE! for my text?

Functions like COUNTIF and COUNTIFS are inherently limited to evaluating criteria up to 255 characters long. If any cell referenced in the criteria exceeds this limit, the function will immediately output a #VALUE! error.

What does the double dash (--) do in the array formula?

The double unary operator (--) converts the TRUE and FALSE boolean values returned by the EXACT function into 1s and 0s. This allows the SUM function to mathematically add them together to give you a total count.

Can I use the MATCH function instead of COUNTIF for long strings?

Yes, you can use a formula combination like =MATCH(TRUE, EXACT(target_cell, range), 0) entered as an array formula. This will locate the row number of the first occurrence of a duplicate string longer than 255 characters.

Why does my formula show curly braces {} around it?

The curly braces indicate that the formula has been successfully entered as an array formula using the Ctrl+Shift+Enter shortcut. You cannot type these braces manually; the spreadsheet software adds them automatically to process multiple values at once.