Hide rows

N

nc

Hi

I have functions in column A which returns a result of text or blank ( i.e.
"" ).
I woul like to run a macro that hides the rows with a blank ( i.e. "" ) cell
in column A. Please help.
 
A

Ardus Petus

Sub HideEmpty()
Dim cell As Range
For Each cell In Range( _
Cells(1, "A"), _
Cells(Rows.Count, "A").End(xlUp) _
)
If cell.Value = "" Then _
cell.EntireRow.Hidden = True
Next cell
End Sub

HTH
 
N

nc

Hi Ardus

Thanks for this macro.

I have list of text. How can I find the position that list end and from
then hide the rows to a psecific row number?

Thanks.
 
Top