How to find repeated numbers in Excel (5 easy methods)

To find repeated numbers in Excel, select the cells and choose Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values, and every number that appears more than once is colored.

This guide covers that method plus four more: a COUNTIF helper column, Remove Duplicates, a PivotTable count and a dynamic array formula that lists each repeated number once.

1. Using conditional formatting to highlight repeats

Conditional formatting colors the repeats without changing any data. It is the safest first check, and the rule updates as you type new numbers into the range.

  1. Select the cells that hold the numbers, for example A2:A200.
  2. Go to the Home tab and select Conditional Formatting.
  3. Point to Highlight Cells Rules and select Duplicate Values.
  4. Pick a format from the list next to values with.
  5. Select OK. Every number that appears two or more times in the selection is now highlighted.

To color the numbers that appear only once instead, open Conditional Formatting > Manage Rules > New Rule, choose Format only unique or duplicate values and set Format all to duplicate or unique.

Conditional formatting cannot be applied to the Values area of a PivotTable, so run it on the source range.

How to find repeated numbers in Excel (5 easy methods)
On the Home tab, open Conditional Formatting, point to Highlight Cells Rules and pick Duplicate Values. (Image: Microsoft)

Excel repeated numbers: highlight, count, remove or list them

What you want Method Changes your data?
See the repeats at a glance 1. Conditional formatting No
Know how many times each number appears 2. COUNTIF helper column No, adds a column
Keep one copy of each number 3. Remove Duplicates Yes, deletes rows
A summary table of numbers and their counts 4. PivotTable with Count No, adds a sheet
A live list of only the repeated numbers 5. UNIQUE and FILTER formula No, spills a list

2. Using COUNTIF function for identifying repeated numbers

COUNTIF counts how many cells in a range match a value. Pointing it at each number in turn gives the number of times that number appears, so any result above 1 is a repeat.

  1. Click the first empty cell next to your data, for example B2 when the numbers start in A2.
  2. Type =COUNTIF($A$2:$A$200,A2) and press Enter. The dollar signs lock the range so it does not shift.
  3. Drag the fill handle at the bottom-right of B2 down to the last row of data.
  4. Read column B: 1 means the number is unique, and 2 or more shows how many times it repeats.
  5. For a yes/no flag instead, use =COUNTIF($A$2:$A$200,A2)>1, which returns TRUE for every repeated number.
  6. Select column B and choose Data > Filter, then filter to values greater than 1 to show only the repeats.

COUNTIF syntax is COUNTIF(range, criteria), and it accepts one condition only. Use COUNTIFS when a repeat should count only if a second column also matches.

3. Using the Remove Duplicates feature to isolate unique or repeated numbers

Remove Duplicates keeps the first copy of each number and deletes the rest. It permanently removes rows, so copy the data to another worksheet first.

  1. Copy the column or table to a new worksheet so the original stays intact.
  2. Remove any outline or subtotals from the data, because Remove Duplicates cannot run on them.
  3. Select the range, or click any cell inside an Excel table.
  4. On the Data tab, in the Data Tools group, select Remove Duplicates.
  5. Under Columns, check only the column that holds the numbers, or use Select All to compare whole rows.
  6. Select OK. Excel reports how many duplicate values it removed and how many unique values remain.
  7. Press Ctrl + Z or select Undo if the result is not what you wanted.

Comparing the row counts before and after tells you how many repeats there were. To build a unique list without deleting anything, select Data > Advanced, choose Copy to another location, enter a cell in Copy to, check Unique records only and select OK.

If the goal is a clean list rather than a count, you can remove duplicates from a single column in other ways too.

Remove duplicate numbers in Excel with the Remove Duplicates column checklist
Check only the column that holds the numbers, or use Select All to compare whole rows, then select OK. (Image: Microsoft)

4. Using PivotTables to summarize and find repeated numbers

A PivotTable groups identical numbers into one row and counts them. The source column needs a single, non-blank header such as Order ID.

  1. Select the column of numbers, including its header.
  2. Go to Insert > PivotTable, choose New Worksheet and select OK.
  3. In the PivotTable Fields pane, drag the number field to Rows.
  4. Drag the same field to Values. Excel sums numbers by default.
  5. Click the arrow next to the field in Values, select Value Field Settings, choose Count under Summarize Values By and select OK.
  6. Sort the count column from largest to smallest, or filter it to show counts greater than 1.

Every row with a count of 2 or more is a repeated number. Format the source as an Excel table so new rows are included when you refresh the PivotTable.

Find repeated numbers in Excel with the PivotTable Fields Rows and Values areas
Drag the number field to Rows and again to Values, then change Value Field Settings from Sum to Count. (Image: Microsoft)

5. Creating a dynamic array formula (Excel 365, 2021 and later)

UNIQUE and FILTER spill their results into the cells below, so one formula returns the full list. They work in Excel for Microsoft 365, Excel 2024, Excel 2021, Excel for the web, and the Excel mobile apps.

  1. Click an empty cell with plenty of empty cells below it, for example D2.
  2. Type =UNIQUE(FILTER(A2:A200,COUNTIF(A2:A200,A2:A200)>1,"No repeats")) and press Enter.
  3. Read the spilled list: each repeated number appears once, in the order it first occurs.
  4. Wrap the formula in SORT, as in =SORT(UNIQUE(FILTER(A2:A200,COUNTIF(A2:A200,A2:A200)>1,"No repeats"))), to list the repeats in ascending order.
  5. To list the numbers that appear exactly once instead, use =UNIQUE(A2:A200,,TRUE), which sets the exactly_once argument.

The "No repeats" text is FILTER's if_empty argument. Without it, a range with no repeats returns a #CALC! error because Excel does not support empty arrays.

If the source is an Excel table referenced with structured references, the spilled list grows and shrinks as you add or remove rows.

Excel UNIQUE dynamic array formula spilling a list of distinct values
UNIQUE spills its results into the empty cells below, so leave room under the formula cell in Excel 365 or 2021. (Image: Microsoft)

How to find duplicate numbers between two columns in Excel

This variation of the formula approach checks whether each number in one column also appears in another column. Use it when you have two lists rather than one.

  1. Put the first list in column A and the second list in column C, leaving column B empty.
  2. In B1, type =IF(ISERROR(MATCH(A1,$C$1:$C$5,0)),"",A1), adjusting $C$1:$C$5 to the real range of the second list.
  3. Select B1 down to the last row of column A.
  4. On the Home tab, in the Editing group, select Fill > Down.
  5. Read column B: it shows each number from column A that also appears in column C and stays blank otherwise.

Lookup functions handle the same job across sheets, and VLOOKUP in Excel works when you also need a value from the matching row.

Find duplicate numbers between two columns in Excel with matches shown in column B
Once the formula is filled down, column B shows 2, 3 and 5, the numbers from column A that also appear in column C. (Image: Microsoft)

Excel duplicate values not highlighting or counting correctly

Numbers that look the same are not flagged as repeats

Extra spaces, nonprinting characters or numbers stored as text make the values differ.

  1. Add a helper column with =TRIM(CLEAN(A2)) to strip spaces and nonprinting characters.
  2. Convert the helper column back to numbers with =VALUE(TRIM(CLEAN(A2))).
  3. Run conditional formatting or COUNTIF on the helper column.

Advanced Filter treats equal values as different

Unique filtering and Remove Duplicates compare the displayed value, so 3/8/2006 and Mar 8, 2006 count as two values.

  1. Select the column and apply one number format from Home > Number Format.
  2. Run the filter or Remove Duplicates again.

Remove Duplicates will not run

The range has an outline or subtotals.

  1. Remove the subtotals and outline from the data.
  2. Select the range again and choose Data > Remove Duplicates.

Duplicate highlighting does not appear in a PivotTable

Conditional formatting by unique or duplicate values cannot be applied to the PivotTable Values area.

  1. Apply the Duplicate Values rule to the source data instead.
  2. Or filter the PivotTable count column to values greater than 1.

The formula returns #CALC!, #REF! or #VALUE!

FILTER found nothing, or the formula points at another workbook that is closed.

  1. Add an if_empty value to FILTER, such as "No repeats", to replace #CALC!.
  2. Open the other workbook that the COUNTIF, UNIQUE or FILTER formula refers to, then recalculate.

Find repeated numbers in Excel FAQ

How do I highlight duplicate numbers in Excel?

Select the range, then choose Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values. Pick a format next to values with and select OK. Every number that appears more than once in the selection is colored.

How do I count how many times a number repeats in Excel?

Use COUNTIF. In the cell next to the first number, type =COUNTIF($A$2:$A$200,A2) and fill it down. The result is the number of times that value appears in the range, and anything above 1 is a repeat.

What is the formula to find duplicates in Excel?

=COUNTIF($A$2:$A$200,A2)>1 returns TRUE for each repeated number. In Excel 365 or Excel 2021 and later, =UNIQUE(FILTER(A2:A200,COUNTIF(A2:A200,A2:A200)>1)) lists every repeated number once.

How do I show only the duplicate numbers in Excel?

Add a COUNTIF helper column, select it and choose Data > Filter, then filter for values greater than 1. In Excel 365 or 2021 and later, a UNIQUE and FILTER formula returns the repeated numbers as a separate list.

Does Remove Duplicates delete data permanently?

Yes. Remove Duplicates deletes the duplicate rows, including data in columns you did not check. Copy the data to another sheet first, and press Ctrl + Z straight away if you need to undo it.

Can I find duplicates in Excel for the web?

Yes. Remove Duplicates works in Excel for the web with the same steps but fewer dialog options, and Ctrl + Z undoes it. UNIQUE and FILTER are also supported there, so the dynamic array formula in method 5 works in a browser.

Is COUNTIF case sensitive?

No. COUNTIF criteria are not case sensitive, so apples and APPLES match the same cells. For numbers this makes no difference, but stray spaces or numbers stored as text can still stop matches.

Why does Excel not find duplicates that look identical?

The cells usually differ in hidden ways: leading or trailing spaces, nonprinting characters, or one number stored as text. Clean the column with TRIM and CLEAN, convert it with VALUE, and run the check again.

Philip Celasco

Philip is a Texas-based technology writer and IT administrator at Techdows.com with more than 10 years of experience creating practical content for everyday users and professionals. He specializes in web browsers, particularly Chromium-based platforms such as Google Chrome, Microsoft Edge, Brave, and Opera. Through his work as an IT administrator, Philip has hands-on experience managing devices, configuring browser policies, troubleshooting software and network issues, and helping people resolve problems that affect productivity and security. His articles are based on practical testing and real-world technical experience. He covers browser settings, extensions, performance problems, privacy controls, security features, and Windows troubleshooting. Outside work, Philip enjoys the quieter side of life in Texas and stepping away from the screen when he can. He has two kids, two cats and loves to play golf with his mother during the weekends.

Leave a Reply

Your email address will not be published. Required fields are marked *