
Originally Posted by
dominicb
Good afternoon Adam a
The code listed below will do the trick for you. It will hide all rows containing duplicate information, so you don't lose the information - it just removes it from view. However feel free to alter it to delete the rows completely if you wish.
Sub HideDuplicate()
On Error Resume Next
Set UsrRng = Selection
For Each UsrCel In UsrRng
Dupd = UsrCel.Address
Dupd = UsrRng.Find(What:=UsrCel, After:=UsrCel, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Address
If Dupd <> UsrCel.Address Then UsrCel.EntireRow.Hidden = True
Next UsrCel
End Sub
To use this highlight just one column that contains the duplicate information and then run the macro.
HTH
DominicB
Bookmarks