View Single Post
  #4   Report Post  
grahammal
 
Posts: n/a
Default Deleting duplicate entries


Try this for size, works for me.

For uY = 1 To 6 'Spin thru 6 times to get them all
Qq = Application.CountA(ActiveSheet.Range("B:B")) 'Get row count before
beginning
For oZ = 2 To Qq 'Main loop
If Cells(oZ, 1) = Cells(oZ - 1, 1) Then 'Check for dups
Cells(oZ, 1).Select 'Select the cell
Selection.Delete Shift:=xlUp 'Delete
Qq = Qq - 1 'Change loop criteria because cell gone
End If 'End
Next oZ 'Inside loop
Next uY 'Outside loop


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=481963