How can I modify this code that loops though each sheet and to delete the row based on duplicates in column 3.
Each page has a table and the table name is always different.
Each page has a table and the table name is always different.
VBA Code:
Private Sub RemoveDuplicates()
'
Application.ScreenUpdating = False
Dim wsheet As Worksheet
For Each wsheet In ActiveWorkbook.Worksheets
If UCase(wsheet.Name) Like "*SHEET*" Then
Application.DisplayAlerts = False
wsheet.Range("Table1[#All]").RemoveDuplicates Columns:=3, Header:= _
xlYes
Application.DisplayAlerts = True
End If
Next
Application.ScreenUpdating = True
End Sub
Last edited: