Macro - hide rows that are 0 without an auto-filter

  • Thread starter Thread starter Roady
  • Start date Start date
R

Roady

Hello:

I would like a macro to review rows 7-435 and if Col F = zero, then hide
that row so that only rows that contain >0 show at the completion of the
macro.

I can't add an auto-filter to help acheive this because I already have an
auto-filter on a section that is located beneath row 435.

Any ideas?

thank you!
 
Sub Hide_Zeros_Rows()
Dim RngCol As Range
Dim i As Range
Set RngCol = Range("F7:F435")
For Each i In RngCol
If i.Value = 0 Then _
i.EntireRow.Hidden = True
Next i
End Sub


Gord Dibben MS Excel MVP
 
worked like a charm!! THANK YOU, Gord!!

Gord Dibben said:
Sub Hide_Zeros_Rows()
Dim RngCol As Range
Dim i As Range
Set RngCol = Range("F7:F435")
For Each i In RngCol
If i.Value = 0 Then _
i.EntireRow.Hidden = True
Next i
End Sub


Gord Dibben MS Excel MVP



.
 
Back
Top