Correct me if I'm wrong but...

S

Stephen

Shouldn't...

For i = 31 To 1000
If .Cells(i, 21).Value = "0" And .Cells(i, 22).Value = "0" Then
..Cells(i, 1).EntireRow.Hidden = True
End If
Next i

hide each row where the values for columns "U" ANd "V" equal zero?
 
B

Bob Phillips

For i = 31 To 1000
If .Cells(i, 21).Value = 0 And .Cells(i, 22).Value = 0 Then
.Rows(i, 1).Hidden = True
End If
Next i


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
J

JLGWhiz

If .Cells(i, 21).Value = "0" And .Cells(i, 22).Value = "0" Then

Unless you have columns U and V formatted as text, you would need to
remove the quote marks from the zeros. It worked OK for me once I did that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top