View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Pete McCosh[_5_] Pete McCosh[_5_] is offline
external usenet poster
 
Posts: 59
Default Hiding rows with 0 as the value

I couldn't figure out whether you wanted every row with a
zero hidden, or just the last one. The following code will
hide every row where there is a zero in column C

Sub HideRows2()
dim X as integer

for X= 8 to 19

IF cells(X,3).value = 0 THEN
Rows(X).Hidden = true
End if

Next X

End Sub

Post back if this isn't what you were looking for,

Pete