IF statements

R

Robert

How can I create an IF statement that will allow me to use an and
statement too? Basically, I need to know how to write an IF statement
that will allow me to have if A1>500,"red", A1<200,"green", but if A1
is between 200-500,"yellow". How can I get the yellow part to work?
Please email me at (e-mail address removed) if you can help me.
 
D

Dave Peterson

In your situation, a nested-if fits much nicer.

But if you change your requirements a little, you could use a formula like this
to see how If and And work together:

=if(and(a1>200,a1<500),"blue","not-blue")
 

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