M
mrtoemoss
I've got a column where occasionaly appears text of the following form:
Zone 1, Zone 2 etc.
I want to clear the cell to the right of any cell that contains this text;
however, I can't figure out how to write the code so that it will look for
Zone 1, then Zone 2 etc. Here's what I've got so far, try not to laugh, I'm
a beginner
Sub ClearEmpty()
Dim rMyCell As Range
Dim i As Integer
For i = 1 To 60
For Each rMyCell In Range("A1:A60")
If rMyCell.Value = "Zone" & i Then
rMyCell.Select
ActiveCell.Offset(0, 1).Value = ""
End If
Next rMyCell
i = i + 1
Next i
End Sub
Zone 1, Zone 2 etc.
I want to clear the cell to the right of any cell that contains this text;
however, I can't figure out how to write the code so that it will look for
Zone 1, then Zone 2 etc. Here's what I've got so far, try not to laugh, I'm
a beginner

Sub ClearEmpty()
Dim rMyCell As Range
Dim i As Integer
For i = 1 To 60
For Each rMyCell In Range("A1:A60")
If rMyCell.Value = "Zone" & i Then
rMyCell.Select
ActiveCell.Offset(0, 1).Value = ""
End If
Next rMyCell
i = i + 1
Next i
End Sub