thewiseguy
Well-known Member
- Joined
- May 23, 2005
- Messages
- 948
- Office Version
- 365
- Platform
- Windows
Hi everyone,
Here is my code:
Sub ClearZeroRowS2()
Application.ScreenUpdating = False
With Sheets("PRF1").Range("Q7:Q319").Resize(, Columns.Count - 16)
.AutoFilter Field:=1, Criteria1:="=0"
On Error Resume Next
.Offset(1).Resize(313).SpecialCells(xlCellTypeVisible).ClearContents
On Error GoTo 0
.AutoFilter
End With
Application.ScreenUpdating = True
End Sub
I am trying to have my code look in range Q7:Q319 and wherever there is a "0" value to clear the contents of the entire row. Any idea why it's not working??
TIA!
Here is my code:
Sub ClearZeroRowS2()
Application.ScreenUpdating = False
With Sheets("PRF1").Range("Q7:Q319").Resize(, Columns.Count - 16)
.AutoFilter Field:=1, Criteria1:="=0"
On Error Resume Next
.Offset(1).Resize(313).SpecialCells(xlCellTypeVisible).ClearContents
On Error GoTo 0
.AutoFilter
End With
Application.ScreenUpdating = True
End Sub
I am trying to have my code look in range Q7:Q319 and wherever there is a "0" value to clear the contents of the entire row. Any idea why it's not working??
TIA!