Duplicate finding in excel

Find and remove duplicates

Excel for Microsoft 365 Excel 2021 Excel 2019 Excel 2016 Excel 2013 Excel 2010 Excel 2007 Excel Starter 2010 More…Less

Sometimes duplicate data is useful, sometimes it just makes it harder to understand your data. Use conditional formatting to find and highlight duplicate data. That way you can review the duplicates and decide if you want to remove them.

  1. Select the cells you want to check for duplicates.

    Note: Excel can’t highlight duplicates in the Values area of a PivotTable report.

  2. Click Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values.

    Remove Duplicates 1

  3. In the box next to values with, pick the formatting you want to apply to the duplicate values, and then click OK.

    Remove Duplicates 2​​​​​​​

Remove duplicate values

When you use the Remove Duplicates feature, the duplicate data will be permanently deleted. Before you delete the duplicates, it’s a good idea to copy the original data to another worksheet so you don’t accidentally lose any information.

  1. Select the range of cells that has duplicate values you want to remove.

  2. Click Data > Remove Duplicates, and then Under Columns, check or uncheck the columns where you want to remove the duplicates.

    Remove Duplicates 3

    For example, in this worksheet, the January column has price information I want to keep.

    Duplicate values highlighted

    So, I unchecked January in the Remove Duplicates box.

    Remove Duplicates 5

  3. Click OK.

Note: The counts of duplicate and unique values given after removal may include empty cells, spaces, etc. 

Need more help?

Connect with an expert. Learn from live instructors.​​​​​​​

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Duplicate Values | Triplicates | Duplicate Rows

This example teaches you how to find duplicate values (or triplicates) and how to find duplicate rows in Excel.

Duplicate Values

To find and highlight duplicate values in Excel, execute the following steps.

1. Select the range A1:C10.

Find Duplicates in Excel

2. On the Home tab, in the Styles group, click Conditional Formatting.

Click Conditional Formatting

3. Click Highlight Cells Rules, Duplicate Values.

Click Highlight Cells Rules, Duplicate Values

4. Select a formatting style and click OK.

Select a Formatting Style

Result. Excel highlights the duplicate names.

Duplicates

Note: select Unique from the first drop-down list to highlight the unique names.

Triplicates

By default, Excel highlights duplicates (Juliet, Delta), triplicates (Sierra), etc. (see previous image). Execute the following steps to highlight triplicates only.

1. First, clear the previous conditional formatting rule.

2. Select the range A1:C10.

3. On the Home tab, in the Styles group, click Conditional Formatting.

Click Conditional Formatting

4. Click New Rule.

New Rule

5. Select ‘Use a formula to determine which cells to format’.

6. Enter the formula =COUNTIF($A$1:$C$10,A1)=3

7. Select a formatting style and click OK.

New Formatting Rule

Result. Excel highlights the triplicate names.

Triplicates

Explanation: =COUNTIF($A$1:$C$10,A1) counts the number of names in the range A1:C10 that are equal to the name in cell A1. If COUNTIF($A$1:$C$10,A1) = 3, Excel formats cell A1. Always write the formula for the upper-left cell in the selected range (A1:C10). Excel automatically copies the formula to the other cells. Thus, cell A2 contains the formula =COUNTIF($A$1:$C$10,A2)=3, cell A3 =COUNTIF($A$1:$C$10,A3)=3, etc. Notice how we created an absolute reference ($A$1:$C$10) to fix this reference.

Note: you can use any formula you like. For example, use this formula =COUNTIF($A$1:$C$10,A1)>3 to highlight names that occur more than 3 times.

Duplicate Rows

To find and highlight duplicate rows in Excel, use COUNTIFS (with the letter S at the end) instead of COUNTIF.

1. Select the range A1:C10.

Find Duplicate Rows in Excel

2. On the Home tab, in the Styles group, click Conditional Formatting.

Click Conditional Formatting

3. Click New Rule.

New Rule

4. Select ‘Use a formula to determine which cells to format’.

5. Enter the formula =COUNTIFS(Animals,$A1,Continents,$B1,Countries,$C1)>1

6. Select a formatting style and click OK.

Highlight Duplicate Rows

Note: the named range Animals refers to the range A1:A10, the named range Continents refers to the range B1:B10 and the named range Countries refers to the range C1:C10. =COUNTIFS(Animals,$A1,Continents,$B1,Countries,$C1) counts the number of rows based on multiple criteria (Leopard, Africa, Zambia).

Result. Excel highlights the duplicate rows.

Duplicate Rows

Explanation: if COUNTIFS(Animals,$A1,Continents,$B1,Countries,$C1) > 1, in other words, if there are multiple (Leopard, Africa, Zambia) rows, Excel formats cell A1. Always write the formula for the upper-left cell in the selected range (A1:C10). Excel automatically copies the formula to the other cells. We fixed the reference to each column by placing a $ symbol in front of the column letter ($A1, $B1 and $C1). As a result, cell A1, B1 and C1 contain the same formula, cell A2, B2 and C2 contain the formula =COUNTIFS(Animals,$A2,Continents,$B2,Countries,$C2)>1, etc.

7. Finally, you can use the Remove Duplicates tool in Excel to quickly remove duplicate rows. On the Data tab, in the Data Tools group, click Remove Duplicates.

Click Remove Duplicates

In the example below, Excel removes all identical rows (blue) except for the first identical row found (yellow).

Remove Duplicates Example Remove Duplicates Result

Note: visit our page about removing duplicates to learn more about this great Excel tool.


Download Article


Download Article

When working with a Microsoft Excel spreadsheet with lots of data, you’ll probably encounter duplicate entries. Microsoft Excel’s Conditional Formatting feature shows you exactly where duplicates are, while the Remove Duplicates feature will delete them for you. Viewing and deleting duplicates ensures that your data and presentation are as accurate as possible.

  1. Image titled Find Duplicates in Excel Step 1

    1

    Open your original file. The first thing you’ll need to do is select all data you wish to examine for duplicates.

  2. Image titled Find Duplicates in Excel Step 2

    2

    Click the cell in the upper left-hand corner of your data group. This begins the selecting process.

    Advertisement

  3. Image titled Find Duplicates in Excel Step 3

    3

    Hold down the Shift key and click the final cell. Note that the final cell should be in the lower right-hand corner of your data group. This will select all of your data.

    • You can do this in any order (e.g., click the lower right-hand box first, then highlight from there).
  4. Image titled Find Duplicates in Excel Step 5

    4

    Click on «Conditional Formatting.« It can be found in the «Home» tab/ribbon of the toolbar (in many cases, under the «Styles» section).[1]
    Clicking it will prompt a drop-down menu.

  5. Image titled Find Duplicates in Excel Step 6

    5

    Select «Highlight Cells Rules,» then «Duplicate Values.« Make sure your data is still highlighted when you do this. This will open a window with customization options in another drop-down menu.[2]

  6. Image titled Find Duplicates in Excel Step 7

    6

    Select «Duplicate Values» from the drop-down menu.

    • If you instead wish to display all unique values, you can select «Unique» instead.
  7. Image titled Find Duplicates in Excel Step 8

    7

    Choose your highlight color. The highlight color will designate duplicates. The default is light red with dark red text.[3]

  8. Image titled Find Duplicates in Excel Step 9

    8

    Click «OK» to view your results.

  9. Image titled Find Duplicates in Excel Step 10

    9

    Select a duplicate’s box and press Delete to delete it. You won’t want to delete these values if each piece of data represents something (e.g., a survey).

    • Once you delete a one-time duplicate, its partner value will lose its highlight.
  10. Image titled Find Duplicates in Excel Step 11

    10

    Click on «Conditional Formatting» again. Whether you deleted your duplicates or not, you should remove the highlight formatting before exiting the document.

  11. Image titled Find Duplicates in Excel Step 12

    11

    Select «Clear Rules,» then «Clear Rules from Entire Sheet» to clear formatting. This will remove the highlighting around any duplicates you didn’t delete.[4]

    • If you have multiple sections of your spreadsheet formatted, you can select a specific area and click «Clear Rules from Selected Cells» to remove their highlighting.
  12. Image titled Find Duplicates in Excel Step 13

    12

    Save your document’s changes. If you’re satisfied with your revisions, you have successfully found and deleted duplicates in Excel!

  13. Advertisement

  1. Image titled Find Duplicates in Excel Step 14

    1

    Open your original file. The first thing you’ll need to do is select all data you wish to examine for duplicates.

  2. Image titled Find Duplicates in Excel Step 15

    2

    Click the cell in the upper left-hand corner of your data group. This begins the selecting process.

  3. Image titled Find Duplicates in Excel Step 16

    3

    Hold down the Shift key and click the final cell. The final cell is in the lower right-hand corner of your data group. This will select all of your data.

    • You can do this in any order (e.g., click the lower right-hand box first, then highlight from there).
  4. Image titled Find Duplicates in Excel Step 17

    4

    Click on the «Data» tab in the top section of the screen.

  5. Image titled Find Duplicates in Excel Step 18

    5

    Find the «Data Tools» section of the toolbar. This section includes tools to manipulate your selected data, including the «Remove Duplicates» feature.

  6. Image titled Find Duplicates in Excel Step 19

    6

    Click «Remove Duplicates.« This will bring up a customization window.

  7. Image titled Find Duplicates in Excel Step 20

    7

    Click «Select All.« This will verify all of your columns have been selected.[5]

  8. Image titled Find Duplicates in Excel Step 21

    8

    Check any columns you wish to use this tool on. The default setting has all columns checked.

  9. Image titled Find Duplicates in Excel Step 22

    9

    Click the «My data has headers» option, if applicable. This will prompt the program to label the first entry in each column as a header, leaving them out of the deletion process.

  10. Image titled Find Duplicates in Excel Step 23

    10

    Click «OK» to remove duplicates. When you are satisfied with your options, click «OK». This will automatically remove any duplicate values from your selection.

    • If the program tells you that there aren’t any duplicates—especially if you know there are—try placing a check next to individual columns in the «Remove Duplicates» window. Scanning each column one at a time will resolve any errors here.
  11. Image titled Find Duplicates in Excel Step 24

    11

    Save your document’s changes. If you’re satisfied with your revisions, you have successfully deleted duplicates in Excel!

  12. Advertisement

Add New Question

  • Question

    How do I get rid of colored highlighted areas in Excel?

    Community Answer

    Press Ctrl-H, click Options, and then click the top Format button to search for colored cells (using the Fill tab). Leave the «Replace with» field blank to delete the contents of cells with the format you specified.

  • Question

    How can I tell if a motherboard or hard drive is bad in a PC?

    Community Answer

    Faulty hard drives will often have data that is said to be corrupted. Motherboards that are faulty result in hardware orientated failures.

  • Question

    Can this method be used to find duplicates between several different sheets? If not, what method can I use to do that?

    Kadriguler

    Kadriguler

    Community Answer

    The repeating data with count of repetitions can be found easily with Excel Vba.

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

wikiHow Video: How to Find Duplicates in Excel

  • You can also identify duplicate values by installing a third-party add-in utility. Some of these utilities enhance Excel’s conditional formatting feature to enable you to use multiple colors to identify duplicate values.

  • Deleting your duplicates comes in handy when reviewing attendance lists, address directories, or similar documents.

Thanks for submitting a tip for review!

Advertisement

  • Always save your work when you’re done!

Advertisement

References

About This Article

Article SummaryX

To view duplicate cells in your worksheet, start by highlighting the column or row you want to check. Click the Home tab, and then click the Conditional Formatting button in the «Styles» area of the toolbar. Select Highlight Cells Rules on the menu, and then Duplicate Values. Now, choose how you’d like Excel to highlight the duplicates in your data, such as in Light Red Fill with Dark Red Text or with a Red Border. Click OK to see your highlighted duplicates. When you’re finished, clear the special formatting by clicking the Conditional Formatting button and selecting Clear Rules and then Clear Rules from Entire Sheet. If you want to delete duplicates without viewing them first, select the cells you want to check, and then click the Data tab at the top. In the «Data Tool»  area of the toolbar, click Remove Duplicates. Click the Select All button at the top-left corner of the window to select all columns, or just select the ones you want to check. Check the box to «My data has headers» if your column has a title cell at the top, and then click OK to remove duplicate cells from the selected area.

Did this summary help you?

Thanks to all authors for creating a page that has been read 1,808,322 times.

Reader Success Stories

  • Anna Krieger

    Anna Krieger

    Nov 30, 2016

    «Thanks a lot for the functions, makes life much easier when getting a list of 1600 items and having to find whether…» more

Is this article up to date?

The searching of duplicates in Excel – is one of the most common tasks for any of office employee. For its solution, there are a few different methods. But – how quickly to find duplicates in Excel and to highlight them with color? For the answer on this frequently asked question let us consider a concrete example.



How to find duplicate values in Excel?

For example we are engaging by check orders, which coming into the firm through Fax and e-mail. There can be such situation that the same order was by the two channels of incoming information. If you register twice the same order, there can be certain problems for the firm. Below we are considering to the decision by means of the conditional formatting.

For example.

For avoiding of the duplicate orders, you can use to the conditional formatting, which helps you quickly to find the duplicate values in Excel column.

The example of the day orders for goods:

For verification whether the day orders are possible duplicates, we will analyze in the names of customers – there is the column B:

  1. To highlight the range B2:B9 and then to select the instrument: «HOME» — «Styles» — «Conditional Formatting» — «New Rule».
  2. New Rule.

  3. To choose «Use a formula to determine which cells to format».
  4. Formula.

  5. To find the duplicate values in Excel column, you need to enter the formula in the input field:
  6. Fill green.

  7. After that you need to press the button «Format» and select to the desired cell shading to highlight duplicates in color — for example, green one. And click OK on all windows are opened.
  8. Result.

Download an example of finding the Identifying Duplicate values in a column.

As can be seen in the picture with the conditional formatting we were able easily and quickly to implement the duplicate finder in function Excel and to detect to the duplicate data cells for the table of the day orders.



The example of COUNTIF function and highlighting of the duplicate values

The principle of the action formula for finding of the duplicates by the conditional formatting is simple. The formula contains the function =COUNTIF(). This function can also be used when searching for the identical values in the range of cells. The first argument in the function to the viewable data range is specified. In the second argument we specify what we are looking for. The first argument has an absolute reference, as it should be the same one. And the second argument conversely — should be changed on the address of the each cell in the viewing range, because it has a relative link one.

The fastest and the simplest ways: to find to the duplicates in the cells.

After the function we can see the comparison operator of the number of the found values in the range with the number 1. That is, if we see more, than one value means that the formula returns the value of TRUE and for the current cell is applied to the conditional formatting.

Like this post? Please share to your friends:
  • Due dates in excel
  • Dtpicker как установить в excel
  • Dtpicker vba excel 2019
  • Dtpicker vba excel 2016
  • Dtd запрещен xml excel