why can't hide zero's based on a zero valuer in range
Maybe this is better
Sub HideZeros()
Dim rng As Range
Dim cell As Range
Set rng = Range("A17:A25,A30:A35,A41:A45")
For Each cell In rng
If cell.Value = 0 Then
Rows(cell.Row).Hidden = True
End If
Next cell
End Sub
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Todd F." wrote in message
...
Thanks but what about disconnected ranges where I might want to read a17
to
25 then skip to a30 to 35 then a41 to 45 and the other rows not in these
range groups would have soemhting besides numbers in them - maybe blanks
or
some writeign.
"Bob Phillips" wrote:
Sub HideZeros()
For i = 17 To Cells(Rows.Count,"A).End(xlUp).Row
If Cells(i,"A").Value = 0 Then
Rows(i).Hidden = True
End If
Next i
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Todd F." wrote in message
...
Sub Hidezeros()
Dim rRange As Range
For Each rRange In Range("A17", Range("A41").End(xlUp))
rRange.EntireRow.Hidden = _
(rRange = 0 And Len(rRange) = 1)
Next rRange
End Sub
I have a macro I found for hiding any rows where a zero is in column A
for
the range of A17 to A41.
It is a simple quote sheet and if nothing is entered in the qty field
then
those rows shoul dhide only not delete when a button is pushed on
sheet
Also how would I say ranf A17 -to A25 & A27 to 31 - tow disconnected
ranges.
thank you for your help and time on this.
|