In the below code it deletes any of the cells A-D in which the the value of Column E = 1.
I would like to modify this so if the value is 2-100.
Any help is appreciated,
I would like to modify this so if the value is 2-100.
Any help is appreciated,
VBA Code:
Public Sub EmptyOutABCAllSheets()
Dim lLastRow As Long
Dim vList() As Variant
vList = Array("Data1", "Data2", "Data3", "Data4")
On Error Resume Next 'It will error out on non-existent sheet or empty data
Application.ScreenUpdating = False
For j = LBound(vList) To UBound(vList)
With Sheets(vList(j))
lLastRow = .Cells.Find(What:="*", LookIn:=xlValues, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
For i = 1 To lLastRow
If .Range("E" & i).Value = "1" Then
.Range("A" & i).Resize(1, 4).ClearContents
End If
Next i
End With
Next j
Application.ScreenUpdating = True