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

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!
 
G

Gord Dibben

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
 
R

Roady

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



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top