sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
I'm using this to delete rows with duplicate values in column B;
What I now need to do is delete rows where the value is the same in columns A, B, C, D and E.
Can someone give me an idea of how to adapt the existing code, or indeed something even simpler?
Thank you!
VBA Code:
For a = Cells(Rows.Count, 2).End(xlUp).Row To 2 Step -1
If WorksheetFunction.CountIf(Range("B2:B" & a), Cells(a, 2)) > 1 Then Rows(a).Delete
Next
What I now need to do is delete rows where the value is the same in columns A, B, C, D and E.
Can someone give me an idea of how to adapt the existing code, or indeed something even simpler?
Thank you!