Greater than or less than

  • Thread starter Thread starter Eric Hedden
  • Start date Start date
E

Eric Hedden

I am trying to do an IF statement that lets me have more
than one arguement. For instance:
=IF(G27>2400,$C$115,0) I wish to have a range. Basically
I want IF(G27<1200 OR G27>2400,$C$115,0). I know that is
incorrect, but how do I do this correctly?
 
IF(OR(G27<1200,G27>2400),$C$115,0)

Also, look at the AND() function.

Easy when you know how. <g>
 
Hi Eric!

Try:
=IF(OR(G27<1200,G27>2400),$C$115,0)

The IF conditions must return TRUE or FALSE. You can pre test them on
their own:

=OR(G27<1200,G27>2400)
Returns TRUE or FALSE depending on contents of G27

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Can I have more than one arguement?
Like G27<2401,G27>3600,$C$116 ??

How do I write that?
 
Hi Eric!

Try:
=IF(OR(G27<1200,G27>2400),$C$115,IF(OR(G27<=2400,G27>3600),$C$116,0))

I amended what you asked for to G27<=2400 but you must decide what to
do with the =2400 case.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
IF(OR(G27<1200,G27>2400),$C$115,IF(OR
(G27 said:
-----Original Message-----
Can I have more than one arguement?
Like G27<2401,G27>3600,$C$116 ??

How do I write 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

Back
Top