I have tried to write code to delete duplicate headings where the text is "Code" from row 2 onwards
When running the macro, the row containing "code" from Row2 onwards in nor being deleted
Kindly amend my code
When running the macro, the row containing "code" from Row2 onwards in nor being deleted
Kindly amend my code
Code:
Sub Delete_Duplicate_Headings()
With Sheets("Imported Data")
Dim LR As Long, i As Long
LR = .Range("A" & .Rows.Count).End(xlUp).Row
For i = LR To 2 Step -1
If .Range("A" & i).Value = "*Code*" Then
.Range("A" & i).EntireRow.Delete
End If
Next i
End With
End Sub