How do i hide rows if a condition is met

T

tony__77

Hi There,

Hopefully a simple one for somebody out there. I want to be able to
hide 2 rows of data if a condition is met (whether it be yes/no or
true/flase) Not sure what the easiest way to do this is and would
appreciate the help.

Thank you

Tony
 
B

Bob Phillips

Something like this

If Range("A1").Value = "X" Then
Columns("H:I").Hidden = True
End If

or more succinctly

Columns("H:I").Hidden = (Range("A1").Value = "X")

--
HTH

Bob

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

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