This article was co-authored by wikiHow staff writer, Megaera Lorenz, PhD. Megaera Lorenz is an Egyptologist and Writer with over 20 years of experience in public education. In 2017, she graduated with her PhD in Egyptology from The University of Chicago, where she served for several years as a content advisor and program facilitator for the Oriental Institute Museum’s Public Education office. She has also developed and taught Egyptology courses at The University of Chicago and Loyola University Chicago.
This article has been fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources.
This article has been viewed 1,926,258 times.
Learn more...
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.
Highlighting and Deleting Duplicates in Excel
- Select the cell range you want to work with. In the Home tab, click Conditional Formatting > Highlight Cell Rules > Duplicate Values. Choose a highlight color and click OK.
- To delete duplicates, click the Data tab and select the Remove Duplicates tool. Check the columns where you want to delete duplicates and click OK.
Steps
-
Select the cells where you want to find duplicates. Click the cell in the upper left-hand corner of your data group. 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).
- You can also use Ctrl + A (Windows) or Command + A (Mac) to select the entire sheet.
-
Click on Conditional Formatting. The Conditional Formatting tool can be found in the Home tab/ribbon of the toolbar (if you’re using Excel for Windows, you’ll find it in the Styles section of the Home tab).[1]Advertisement
-
Clicking it will prompt a drop-down menu.
-
Select Highlight Cells Rules. Make sure your data is still highlighted when you do this.[2]
-
Select Duplicate Values from the drop-down menu.[3]
-
Choose “Duplicate” in the dialog box. By default, the option to highlight duplicate values should already be selected. If it’s not, click the dropdown that allows you to choose which type of values to highlight and choose “Duplicate.”
- If you instead wish to display all unique values, you can select "Unique" instead.
-
Choose your highlight color. Select this option from the dropdown next to “values with” or “Format with” (depending on your version of Excel). The highlight color will designate duplicates. The default is light red with dark red text.[4]
-
Click OK to view your results. All duplicate values should be highlighted in the color you selected.
-
Use the COUNTIF function for more complex situations. The basic “Duplicate Values” rule will highlight any cells that contain duplicates. However, there might be situations where you want to adjust or limit what kinds of duplicates are highlighted. For example, you might want to highlight only the Nth and subsequent duplicates, highlight entire rows that contain duplicates, or find only duplicate rows. To do this:[5]
- Select the cells you want to work with, then go to Conditional Formatting > New Rule.
- In Windows, select Use a formula to determine which cells to format from the Select a Rule Type menu. On Mac, select Classic from the Style dropdown, then choose Use a formula to determine which cells to format from the next dropdown.
- Enter the COUNTIF formula in the formula field. The right way to format this will depend on the cell range you’re working with and what information you want to highlight. For detailed instructions on how to format this formula to get the results you want, see this guide from Microsoft.
- There are numerous examples of COUNTIF formulas you can use for a variety of duplicate-finding situations here. Note that these examples need to be personalized to the specific worksheet and cell values you are working with.
- Choose your fill color and click OK.
-
Select a duplicate's cell and press Delete to delete it (optional). If you’re trying to get rid of unwanted or accidental duplicate values, you can do so by manually deleting them. If you have a huge dataset with lots of duplicates, it might be easier to use the Remove Duplicates tool.
- Once you delete a one-time duplicate, its partner value will lose its highlight.
-
Remove the highlighting when you’re done. Whether you deleted your duplicates or not, you may want to remove the highlight formatting before exiting the document. To do so:
- Select Conditional Formatting from the toolbar again.
- Click Clear Rules > Clear Rules from Entire Sheet.
- 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.
- Save your changes before closing the document.
-
Select the cells where you want to find and delete duplicates. Click the cell in the upper left-hand corner of your data group. 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).
- You can also use Ctrl + A (Windows) or Command + A (Mac) to select the entire sheet.
-
Click on the Data tab. It’s in the toolbar at the top of Excel.[6]
-
Click Remove Duplicates. It’s the icon that looks like a column of three alternating blue and white cells with a red X at the bottom. If you’re in Excel for Windows, this will be in the section labeled “Data Tools.” In Excel for Mac, the sections are unlabeled, but you’ll see it near the right end of the toolbar. Clicking this icon will bring up a customization window.[7]
-
Select the types of data you want to delete. To delete all duplicates, check the box next to “Select All.” If you only want to delete duplicates from specific columns, tick the boxes next to the names of those columns (e.g., “Name,” “Date of Birth,” “Address”).[8]
- If your columns have headers, click the “My data has headers” or “My list has headers” option at the top. This will prompt the program to label the first entry in each column as a header, leaving them out of the deletion process.
-
Click OK to remove duplicates. When you are satisfied with your selections, click OK. This will automatically remove any duplicate values from your selection.
- If you get an error message saying your sheet doesn’t contain any duplicates, make sure you have the column(s) containing the duplicates selected in the Remove Duplicates dialog box.
- Don’t forget to save your changes when you’re done!
Community Q&A
-
QuestionHow do I get rid of colored highlighted areas in Excel?
Community AnswerPress 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. -
QuestionHow can I tell if a motherboard or hard drive is bad in a PC?
Community AnswerFaulty hard drives will often have data that is said to be corrupted. Motherboards that are faulty result in hardware orientated failures. -
QuestionCan this method be used to find duplicates between several different sheets? If not, what method can I use to do that?
KadrigulerCommunity AnswerThe repeating data with count of repetitions can be found easily with Excel Vba.
wikiHow Video: How to Find & Delete Duplicates in Microsoft Excel (Fast & Easy)
Tips
-
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.Thanks
-
Deleting your duplicates comes in handy when reviewing attendance lists, address directories, or similar documents.Thanks
References
- ↑ https://support.microsoft.com/en-us/office/find-and-remove-duplicates-00e35bea-b46a-4d5d-b28e-66a552dc138d
- ↑ https://support.microsoft.com/en-us/office/find-and-remove-duplicates-00e35bea-b46a-4d5d-b28e-66a552dc138d
- ↑ https://support.microsoft.com/en-us/office/find-and-remove-duplicates-00e35bea-b46a-4d5d-b28e-66a552dc138d
- ↑ https://support.microsoft.com/en-us/office/find-and-remove-duplicates-00e35bea-b46a-4d5d-b28e-66a552dc138d
- ↑ https://support.microsoft.com/en-us/office/use-a-formula-to-apply-conditional-formatting-in-excel-for-mac-34093090-235b-4476-a7ce-1da7880c750f
- ↑ https://support.microsoft.com/en-us/office/filter-for-unique-values-or-remove-duplicate-values-ccf664b0-81d6-449b-bbe1-8daaec1e83c2
- ↑ https://support.microsoft.com/en-us/office/find-and-remove-duplicates-00e35bea-b46a-4d5d-b28e-66a552dc138d
- ↑ https://support.microsoft.com/en-us/office/find-and-remove-duplicates-00e35bea-b46a-4d5d-b28e-66a552dc138d
About This Article
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.
Reader Success Stories
-
"Thanks a lot for the functions, makes life much easier when getting a list of 1600 items and having to find whether some have already been included in a previous list of 98 items!"..." more
















