Home > Excel Tutorial > Highlight Duplicate Records

Highlight Duplicate Records

 

In this example, duplicate records are searched in the used ranges of workbook sheets by macro :

“For syf = 1 To Sheets.Count
Sheets(syf).Select
ActiveSheet.UsedRange.Select
…”

Background of found records are painted and new borders are drew  :

“For Each mycell In Selection
If WorksheetFunction.CountIf(Selection, mycell.Value) > 1 Then
mycell.Interior.ColorIndex = 8
mycell.Borders.Weight = xlThin
mycell.Borders.ColorIndex = 44
End If
Next”

Template can be downloaded here

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: