Blog
Find Duplicates in Excel: Highlight, Count and Compare Lists
To find duplicates in Excel is to show where repeated values sit, and how often, without deleting anything. It is the step that keeps you from removing a real student who shares a name with another one, or counting the same field trip payment twice. Comparing two lists to see which entries already exist is the same job in a different shape. Every method below leaves the data untouched, so if a result looks wrong you only clear the rule.

Method 1: highlight duplicates with conditional formatting
The fastest way is the built-in Duplicate Values rule.
- Select the column or range to check. Clicking the column letter selects the whole column.
- Go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values.
- Keep Duplicate in the first box, choose a format (the default is light red fill with dark red text) and click OK.
Switch Duplicate to Unique in the same dialog and Excel colors the values that appear only once. The Microsoft Learn reference for the UniqueValues rule describes the same setting as a rule that looks for either duplicate or unique values in the range. Three limits are worth knowing. The rule colors every copy, including the first one. It compares one cell at a time, so it cannot find rows where two columns match together. And it ignores case, so "ab-100" and "AB-100" are colored as duplicates.
Select two columns at once with Ctrl and apply the rule, and Excel treats them as one range. With last semester's tutoring sign-ups in column A and this semester's in column C, the students who signed up both times light up on both sides. Clean duplicates inside each column first, or those get colored too.
Method 2: formula rules for whole rows and multiple columns
To color whole rows, or to test several columns together, use a formula rule.
- Select the whole table, for example A2:D100.
- Choose Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format.
- Enter
=COUNTIF($B$2:$B$100,$B2)>1, click Format, pick a fill and confirm.
Lock the range completely ($B$2:$B$100) and lock only the column of the cell being tested ($B2). Every cell in the row then checks its own row's value in column B, and the full row is colored. For a two-column match, chain the pairs: =COUNTIFS($A$2:$A$100,$A2,$B$2:$B$100,$B2)>1.
To leave the first copy uncolored and mark only the repeats, use a range that grows as it goes down: =COUNTIF($B$2:$B2,$B2)>1. Only rows whose value already appeared above are flagged, which is exactly the set you would delete.
Method 3: count with COUNTIF and filter
Color shows where duplicates are, not how many there are. In a helper column, =COUNTIF($B$2:$B$100,B2) returns how many times each value appears. According to the Microsoft Learn reference for COUNTIF, the criteria can be a number, expression, cell reference or text, and the ? and * wildcards apply, with a tilde before a literal asterisk or question mark.
That wildcard support can bite. An assignment label such as "Quiz 3*", where the asterisk marks a retake, is read as a pattern and counts "Quiz 3" and "Quiz 3B" too. Escape it with SUBSTITUTE(B2,"*","~*"), or use the EXACT method described below. COUNTIF also treats the number 10023 and the text "10023" as the same value, which helps when codes have mixed formats. It cannot use criteria longer than 255 characters, so compare codes rather than long notes.
With a count column, use Data > Filter and keep values of 2 or more. With a colored column, open the filter arrow, choose Filter by Color > Filter by Cell Color and pick the highlight. Sort the filtered rows so matching values sit next to each other, and deciding which one to keep becomes easy.
In Microsoft 365, =UNIQUE(FILTER(B2:B100,COUNTIF(B2:B100,B2:B100)>1)) lists each duplicated value once, ready to paste into a report.
Comparing two lists on different sheets
Checking a new list against a master list is duplicate-finding across sheets. Next to the new list, =COUNTIF(Master!$B:$B,B2) returns 0 for new entries and 1 or more for existing ones. =IF(COUNTIF(Master!$B:$B,B2)>0,"Existing","New") writes the answer in words.
To color the matches instead, add a formula rule with =COUNTIF(Master!$B:$B,$B2)>0. Conditional formatting has accepted references to other sheets since Excel 2010. If the match count looks too low, the formats differ: IDs with and without a prefix or hyphens, trailing spaces after names, numbers stored as text. Compare cleaned helper columns such as =TRIM(SUBSTITUTE(B2,"-","")) instead.
To pull information back from the master, use a lookup: =IFERROR(INDEX(Master!$A:$A,MATCH(B2,Master!$B:$B,0)),"New") returns the existing record's ID or the word New. When case matters, replace COUNTIF with =SUMPRODUCT(--EXACT($B$2:$B$100,B2)), which counts only exact, case-sensitive matches.
👉 Remove Duplicates in Excel: 4 Ways and Which Columns to Pick
Worked example: screening a survey sign-up list
A graduate student running a two-wave survey for her thesis gets 186 sign-ups for the spring wave. Her fall participant list has 640 entries. The spring wave needs new participants only, so she has to remove anyone who already took part in the fall and catch anyone who signed up twice.

She starts inside the sign-up list. A Duplicate Values rule on the university ID column colors 8 pairs. A COUNTIF column confirms each appears exactly twice; the same people had submitted the form once from a phone and once from a laptop. A second rule, =COUNTIF($C$2:$C2,$C2)>1, marks only the second submission in each pair, and she drops those, keeping each person's first answers.
Next, the fall comparison. Her first =COUNTIF(Fall!$D:$D,C2) finds only 2 returning participants, which is far too few. The fall list stores university IDs with a leading U, as in U0412345, and the spring form collected digits only; the two matches were people who typed the U themselves. After adding a helper column without the U on both sheets and comparing those, 23 sign-ups turn out to be fall participants.
She labels every row with =IF(COUNTIF(Fall!$E:$E,E2)>0,"Returning","New"), filters for New, and copies 155 sign-ups (186 minus 8 repeats and 23 returning) to the invitation sheet. Had she trusted the first count, 21 returning participants would have been invited again as new, and people who had already seen the questions would have ended up in the spring sample. The helper columns stay in the file, so the next wave only needs pasting in.
Common mistakes
A rule applied to B2:B100 ignores rows pasted below row 100. Convert the data to a table with Ctrl+T so the range grows with it. Leaving the dollar signs out of $B$2:$B$100 makes the range slide down row by row, so later rows miss matches above them. Dates that include a time, such as 3/8/2026 9:30, differ from 3/8/2026 even when the cell shows only the date; compare =INT(A2) instead. And clear the highlight, or replace it with a text column such as Existing and New, before you share the file, so the next person does not have to guess what pink means.
FAQ
Q. Two values look identical but are not highlighted. Why?
Something invisible differs: a trailing space, a number stored as text or a line break. Compare =LEN() and =ISNUMBER() for the two cells, then clean with TRIM or Text to Columns.
Q. How do I remove the duplicate highlighting?
Use Home > Conditional Formatting > Clear Rules for the selection or the whole sheet. To edit one rule, open Manage Rules, set the list to This Worksheet and choose Edit Rule or Delete Rule.
Q. Can I find rows where several columns all match?
Not with the Duplicate Values menu. Use a formula rule with COUNTIFS, or join the columns in a helper column with =A2&"|"&B2 and apply Duplicate Values to that.
Q. Conditional formatting is slow on a large sheet. What helps?
Limit the range to the actual data instead of whole columns, and delete the rule when you finish. On sorted data, comparing each row to the one above with =B2=B1 is much faster.
Compare two lists with inline AI
inline AI opens both lists side by side on your PC. Say "compare on university ID and mark returning participants and repeat sign-ups," and it lines up the prefix and spacing differences and labels every row Returning, New or Repeat. The same request works for a club roster against this semester's sign-ups.
Gradebooks and spreadsheets, finished by inline AI in the file itself.
Ask in one sentence for roll-ups, trackers and the cleanup you repeat every week. Your files never leave your computer.




