View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Hide the line when cell B is empty

Sub hiderowifcolempty()
For i = Cells(Rows.Count, "b").End(xlUp).Row To 1 Step -1
If Len(Application.Trim(Cells(i, "b"))) < 1 Then _
Rows(i).Hidden = True
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Christine" wrote in message
...
I would be grateful if someone could provide me with code that will hide a
line when a particular cell (e.g. B) is empty.