Sub HideRows()
Dim rw As Range
For Each rw In Rows("40:60")
If Application.Count(Range(Cells(rw.Row, 1), Cells(rw.Row, 15))) = 0 Then
rw.Hidden = True
End If
Next
End Sub
Sub UnhideRows()
Rows("40:60").Hidden = False
End Sub
Works well except that sometimes I have text in column A (was assuming that "data" could be text or numbers) and nothing in B through N. The macro seems to hide the row in this case when I want to keep it unhidden. Is there a fix?
Re: One little glitch, Jose
Replace:
If Application.Count(Range(Cells(rw.Row, 1), Cells(rw.Row, 15))) = 0 Then
With
If Application.CountA(Range(Cells(rw.Row, 1), Cells(rw.Row, 15))) = 0 Then
Regards,
Barrie
Beautiful! Thanks, Barrie