Hide row if cell is empty
Sub HideRows()
range("A1:A20").Entirerow.Hidden = False
on Error resume Next
set rng = Range("A1:A20").specialCells(xlblanks)
On Error goto 0
if not rng is nothing then
rng.Entirerow.Hidden = True
End if
End Sub
Assume no merged cells.
--
Regards,
Tom Ogilvy
"Qaspec" wrote in message
...
On a button click I'd like to hide row 4 if a4 is empty. I'd like to this
up
to row 20 if the correspondince cell to that row in column a is empty.
Thanks.
|