View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default If or Case help - Which to use

The If is simple:

Sub stephen()
For i = 31 To 1000
If Cells(i, "U").Value = 0 And Cells(i, "V").Value = 0 Then
Cells(i, "U").EntireRow.Hidden = True
End If
Next
End Sub

--
Gary''s Student - gsnu200761


"Stephen" wrote:

I'm trying to say from rows 31 thru 1000, if U and V are zero then hide the
row. if not both zero then show the row.

Having problems putting this into an if statment wondering if I'd be better
served using a case statement but not sure how to write it.