Discussion on:

Message 4 of 8
0 Votes
+ -
A little code to find the dup
I work with large data sets in excel. If I'm looking for a duplicate, usually I just need to find it in place without filtering. First I sort the data on the column, click the first cell in the column, then run a small utility macro.

Sub NextAlike()
' This macro moves the active cell down until it finds a duplicate.
varSwitch = False
Do Until varSwitch = True
Item = ActiveCell
ActiveCell.Offset(1, 0).Range("A1").Select
NextItem = ActiveCell
If NextItem = Item Then
ActiveCell.Offset(-1, 0).Range("A1").Select
varSwitch = True
End If
Loop
End Sub
Posted by Mark.Mathews
6th Mar