I have the folowing macro
The data is only cleared on sheet "Imported Data" and not on sheet "All Data"
Kindly amend my code
The data is only cleared on sheet "Imported Data" and not on sheet "All Data"
Kindly amend my code
Code:
Sub Clear_Data()
Sheets("Imported Data").Select
Dim LR As Long
LR = Cells(Rows.Count, "A").End(xlUp).Row
With Range("A1:AZ" & LR)
.UnMerge
End With
With Range("A1:AZ" & LR)
.ClearContents
End With
Sheets("All Data").Select
With Range("A1:AZ" & LR)
.UnMerge
With Range("A1:AZ" & LR)
.ClearContents
End With
End With
End Sub