Hey I have a piece of code
which as you may note deletes duplicates in a column in this case column A.
Not being the greatest yet with VBA what do I need to do to this code to make it work on all columns up to BX.
Is there away to put a loop in, I tried and failed
Thanks
Tim
Code:
Sub DeleteDupsnew()
Dim x As Long
Dim LastRow As Long
LastRow = Range("A65536").End(xlUp).Row
For x = LastRow To 1 Step -1
If Application.WorksheetFunction.CountIf(Range("A1:A" & x), Range("A" & x).Text) > 1 Then
Range("A" & x).EntireRow.Delete
End If
Next x
End Sub
which as you may note deletes duplicates in a column in this case column A.
Not being the greatest yet with VBA what do I need to do to this code to make it work on all columns up to BX.
Is there away to put a loop in, I tried and failed
Thanks
Tim