Hello...
Somewhat experience with basic and self taught. Need some help..
I have 2 separate macros and wanted to combine them. The issue is the two differetn For Each statements. Both steps are on the same worksheet and I am trying to consolidate the steps. I know it is very simple code, but it is driving me crazy.
Sub ClearZero()
Sub ClearAboveThirty()
Dim cell As Range
Range("e2:e100").Select
For Each cell In Selection
If cell.Value > 30 Then
cell.ClearContents
End If
Next cell
End Sub
Thanks in advance!
Somewhat experience with basic and self taught. Need some help..
I have 2 separate macros and wanted to combine them. The issue is the two differetn For Each statements. Both steps are on the same worksheet and I am trying to consolidate the steps. I know it is very simple code, but it is driving me crazy.
Sub ClearZero()
For Each cell In [a2:a100]
If cell.Value <= "0" Then cell.ClearContents
Next cell
End SubIf cell.Value <= "0" Then cell.ClearContents
Next cell
Sub ClearAboveThirty()
Dim cell As Range
Range("e2:e100").Select
For Each cell In Selection
If cell.Value > 30 Then
cell.ClearContents
End If
Next cell
End Sub
Thanks in advance!