Hide blank rows in a range

T

trussman

Hello,

This code works but, I want to hide rows within this range (rows 5:154)
only

Sub HideBlankRows()

Dim RngCol As Range
Dim i As Range
Set RngCol = Range("A1:A20", Range("A" & _
Rows.Count).End(xlUp).Address)
For Each i In RngCol
If i.Value = "" Or i.Value = "*" Then i.EntireRow.Hidden = True
Next i
End Sub


Thanks in advance for the help

Marc
 
T

Tom Ogilvy

Sub HideBlankRows()

Dim RngCol As Range
Dim i As Range
Set RngCol = Range("A5:A154)
For Each i In RngCol
If i.Value = "" Or i.Value = "*" Then i.EntireRow.Hidden = True
Next i
End Sub
 

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