VBA macro to find duplicates in excel

VBA macro to find duplicates in excel sheet. This macro finds the duplicates in user selected range and highlights them in light red color.

VBA code to find and highlight duplicates

Add above code to your excel workbook

How to use this macro

  1. Select the range (column/row/columns and rows…) in which you want to find the duplicates
  2. Under Developer tab, click on Macrosvba-macro-find-duplicates
  3. Select findAndHighlightDuplicates macro and click on Run button
    run-macro-find-duplicates
  4. Duplicates in the selected range will be highlighted in light red colormacro-duplicates-highlighted-in-red