View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ruan[_3_] Ruan[_3_] is offline
external usenet poster
 
Posts: 33
Default Hiding Rows with Formulas

Hello

I have an IF statement in Range("B9:B1000"), which either displays a value
or a blank cell. How do I hide the rows, if the result in this range is a
blank cell? The below formula doesn't work.

Sub HideRows()

With Range("B9:B1000")
.EntireRow.Hidden = False
.SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
End With
Range("B9").Select
End Sub

Thanks
Ruan