Oct 18 2023 11:06 AM
Hi,
I have a file that I would like to have a macro that will clear the contents of cells E18:F19 on all the sheets except the first sheet named " Action". I have sampled two sheets but they could be more than that.
These two cells are sent with data that is not compatible with my other program and I have to manually clear the cells. The file has two macros running perfectly doing other things.
thanks in advance.
Oct 18 2023 12:13 PM
SolutionLike this:
Sub ClearData()
Dim wsh As Worksheet
Application.ScreenUpdating = False
For Each wsh In Worksheets
Select Case wsh.Name
Case "Action"
' Skip sheet
Case Else
wsh.Range("E18:F19").ClearContents
End Select
Next wsh
Application.ScreenUpdating = True
End Sub