Hello All
I have this:
This is working to find and remove duplicates in Column CN. However, I don't know how to loop thru all columns (beginning with column E) to the end of columns where no data exist anymore, to find duplicates in each individual column.
Currently, if I want to find duplicates in Column L, then I change the CN to L and run the macro again...and so on.
Thanks for the help
I have this:
VBA Code:
Option Explicit
Dim sht As Worksheet
Sub RemoveDuplicate()
For Each sht In ActiveWorkbook.Worksheets
If sht.Visible And sht.Name = "Matrix" Then
sht.Activate
ActiveSheet.Range("CN:CN").RemoveDuplicates Columns:=1, Header:=xlYes
End If
Next sht
End Sub
This is working to find and remove duplicates in Column CN. However, I don't know how to loop thru all columns (beginning with column E) to the end of columns where no data exist anymore, to find duplicates in each individual column.
Currently, if I want to find duplicates in Column L, then I change the CN to L and run the macro again...and so on.
Thanks for the help