{"id":664,"date":"2018-06-28T13:49:59","date_gmt":"2018-06-28T13:49:59","guid":{"rendered":"http:\/\/officetuts.net\/excel\/?p=664"},"modified":"2024-03-26T15:23:49","modified_gmt":"2024-03-26T15:23:49","slug":"duplicates","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/examples\/duplicates\/","title":{"rendered":"Finding and Removing Duplicates in Excel"},"content":{"rendered":"\n

While working in Excel, you can quickly remove duplicated values when you deal with a few cells. But when you deal with thousands of cells, this is not the best way. It\u2019s not only time-consuming but also error-prone.<\/p>\n\n\n\n

That\u2019s why Microsoft gives you a few ways to eliminate duplicates. In this lesson, I\u2019ll show you how you can achieve this using different methods, both the basic ones and the more complicated ones, with the VBA code included.<\/p>\n\n\n\n

Highlighting duplicate values using conditional formatting<\/h2>\n\n\n\n

Conditional formatting<\/a> is probably the most popular method to distinguish data visually. It can be used to highlight low and high values with different colors. Besides that, you can find here a tool that will help you find duplicated and unique values.<\/p>\n\n\n\n

Example:<\/strong><\/p>\n\n\n\n

First, create the following table with names.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Select all the cells, and choose conditional formatting in HOME >> Styles >> Conditional Formatting >> Highlight Cells Rules >> Duplicate Values<\/strong>.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

When you choose this option, a new window will appear.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Here, you can choose whether you want to search for duplicate or unique values, and mark them with one of the available formats or even create your own custom format.<\/p>\n\n\n\n

We will get the following result.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Finding duplicate values using DGET<\/h2>\n\n\n\n

Another way to find duplicates is by using the DGET<\/strong> function. This function is used to retrieve a single record from a database that matches the criteria given in the argument.<\/p>\n\n\n\n

This function returns one of three values:<\/p>\n\n\n\n