IF formula with 3 possible outcomes

  • Thread starter Aaron Hodson \(Coversure\)
  • Start date
A

Aaron Hodson \(Coversure\)

Hello everyone,

I am trying to get the following formula to work, without success.

I would like C3 to have 3 possible outcomes, 1,2 or 3. This data will be
sent by P10.
P10 should be (in simple):

IF P9 IS EQUAL TO 0 THEN C3 EQUALS 1
IF P9 IS GREATER THAN 0 AND LESS THAN 2 THEN C3 EQUALS 2
IF P9 IS EQUAL TO OR GREATER THAN 2 THEN C3 EQUALS 3

Your help is much appreciated as always,

Kind regards

Aaron
 
A

Aaron Hodson \(Coversure\)

Oops, still need help but,

The formula can go direct into C3 without the need for P10 existing,

Thanks again in advance of the reply.

Kind regards

Aaron
 
D

David Biddulph

To start with, if you want a value in C3, you put your formula in C3, not in
P10. A formula can't "push" data into another cell.

The formula in C3 is =IF(P9<0,"undefined output",IF(P9=0,1,IF(P9<2,2,3)))
 
S

Sloth

I know this has been answered, but you can use the following formula to get
the same results

=(P9>=0)+(P9>0)+(P9>=2)

your preference depends on how you think. I hate using nested ifs, but a
lot of people like them.
 
A

Aaron Hodson \(Coversure\)

Thanks Sloth,

I am trying to get to grips with formulas and it's handy to know all the
different methods.

Thanks

Aaron
 
J

JE McGimpsey

That doesn't seem to work for, say, P9 = 0.5

Perhaps

=1 + (P9>0) + (P9>=2)
 

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