MrExcel Publishing
Your One Stop for Excel Tips & Solutions

How to find duplicate names in different rows

Posted by Jonathan on June 20, 2001 2:21 PM

I have a rather perplexing one here. I have a spreadsheet that is rather large (will get up to 12000 rows). I need to match the criteria in 3 columns to see if I have duplicates in rows. Data sort works, but I must scroll down the entire spreadsheet to find a dupe by row after it's been sorted. Example:
columna a (lastname), column b (firstname), column c (customerid), column d-w (misc. info).

Thanx all,


Posted by Ben O. on June 20, 2001 2:50 PM

I would recommending using a conditional sum/count formula. The formula will count the rows if they match your criteria, which will be the first name, last name, and ID. If the formula's result is 1, there are no duplicates. If it's 2 there's 1 duplicate, 3 there are two duplicates, etc.

If you have the Conditional Sum Wizard installed, I would use that. Otherwise use this formula, remembering to press Ctrl + Shift + Enter when you enter it (since it's an array formula) and to change the ranges to the limits of your data:


Just enter the formula in X2 and autofill it all the way down. I hope it works,


P.S. This is a lot easier with Access

Posted by Aladin Akyurek on June 20, 2001 3:06 PM


use conditional formattting to highlight the duplicate.

Lets say you have the following data in A1:C5.


Type in some unused cell the following formula:


Go to the formula bar and copy this formula.

Activate C2 (we start in 2n row), activate the option Format|Conditional Formatting, choose "Formula is", now paste the copied formula. Activate the Patterns tab and select a color and click OK.

While in C2, click the icon for Format Painter, select the cells from C3 onwards and let it go.

A colored C cell indicates a duplicate row.