Typo:
Dim rng as Range
HTH
--
AP
"Bob Phillips" a écrit dans le message
de ...
Sub Test()
Dim iLastRow As Long
Dim i As Long
Dim rng As rng
iLastRow = Cells(Rows.Count, "B").End(xlUp).Row
For i = 1 To iLastRow
If Cells(i, "B").Value = 0 Then
If rng Is Nothing Then
Set rng = Rows(i)
Else
Set rng = Union(rng, Rows(i))
End If
End If
Next i
If Not rng Is Nothing Then rng.Hidden = True
End Sub
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"PaulOakley"
wrote
in message ...
Hello,
I need to run a macro to hide any rows that contain a zero value in a
certain column number. e.g hide all rows that contain a zero value in
column B?
Is this possible do you think?
Thanks in advance
Paul
--
PaulOakley
------------------------------------------------------------------------
PaulOakley's Profile:
http://www.excelforum.com/member.php...o&userid=25103
View this thread:
http://www.excelforum.com/showthread...hreadid=529130