Find Duplicate values in Excel – Multiple Methods

There are other ways to identify and format duplicates in Microsoft Excel:

  1. Filter: You can use the “Sort & Filter” option to sort your data and then use the “Filter” option to only display the duplicate values. You can then select and format the duplicates as desired.
  2. Formula: You can use a formula such as =IF(COUNTIF(A:A,A1)>1,"Duplicate","") in a separate column to flag duplicates. Then you can use conditional formatting to highlight the flagged cells.
  3. Pivot Table: You can create a pivot table to count the occurrences of each value in a column. Any value with a count greater than 1 will be a duplicate, and you can use conditional formatting to highlight the duplicates.

These are just a few examples of alternative methods to identify and format duplicates in Microsoft Excel. The method you choose will depend on the specific needs of your data and the results you are trying to achieve.

Find Duplicate values by Conditional Formatting

In Microsoft Excel, you can use conditional formatting to highlight or flag duplicate entries in a column. Here’s how:

  1. Select the range of cells you want to format.
  2. Go to the “Home” tab and click on the “Conditional Formatting” button in the “Styles” section.
  3. Select “Highlight Cells Rules” and then “Duplicate Values.”
  4. Choose a format you want to apply to the duplicate entries, such as a color fill or bold text.
  5. Excel will now automatically highlight any duplicate entries in the selected range.

You can also use a formula-based approach for more complex conditional formatting scenarios. The formula for identifying duplicates in Excel is =COUNTIF(range, cell)>1.

Find Duplicate values by using Macro in Excel

Yes, you can also use a macro to identify and format duplicate entries in Microsoft Excel. Here’s an example of a macro that will highlight duplicate entries in column A:

  1. Open the Microsoft Visual Basic Editor by pressing “Alt + F11.”
  2. In the editor, select “Insert” and then “Module.”
  3. Paste the following code into the module:
Sub HighlightDuplicates()

Dim rng As Range
Dim cel As Range

Set rng = Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row)

For Each cel In rng
    If WorksheetFunction.CountIf(rng, cel.Value) > 1 Then
        cel.Interior.Color = RGB(255, 0, 0)
    End If
Next cel

End Sub
  1. Close the Visual Basic Editor and return to Excel.
  2. Run the macro by pressing “Alt + F8” and selecting “HighlightDuplicates.”
  3. Excel will now highlight any duplicate entries in column A with red fill.

Note: You can modify the code to work on any column you desire and change the highlight color to your liking.


Gavesh S. is the founder and owner of He has been a Microsoft Excel Expert since early 2012. With experience explained thousand of queries for companies including Microsoft and top other financial institutions. Theres is most uses of Business Analysis, People Management, Automation, Performance Reporting, Strategic Analysis, Project Management, Managing Programs, Account Management etc.  In 2021 he found to share his experiences with other who’s is looking to learn MS Excel. He is currently working on a book about working in the Learn Excel, expanding his skill set beyond the Excel Learning niche.