Hide Row If Any Cell In It = 0
Sub HideThem()
Dim r As Range
Set r = Range("A1:J100").SpecialCells(xlCellTypeFormulas)
Set rHide = Nothing
For Each rr In r
If rr.Value = 0 Then
If rHide Is Nothing Then
Set rHide = rr
Else
Set rHide = Union(rHide, rr)
End If
End If
Next
If rHide Is Nothing Then
Else
rHide.EntireRow.Hidden = True
End If
End Sub
--
Gary''s Student - gsnu201001
"robzrob" wrote:
Hello All
Searched high and low amongst the forums for this and found some close
solutions, but can't seem to make any work.
I have Rows 1-100 & Cols A-J all with formulas or text in them. If
the result of any of the formulas in any of the that range is 0, I
want the entire row hidden.
Cheers
.
|