Between one number and another

  • Thread starter Thread starter Neon520
  • Start date Start date
N

Neon520

I tried to set up an IF criteria:

IF(A1>=10,True_Action1, Else IF(A1>=20, True_Action2, False_Action)

It seems like the formula only perform True_Action1 because criteria 2
overlap criteria one as well. How can I fix this bug? I was thinking
changing criteria one to if A1 is between 10 and 19.99, but I don't know how
to code this.... Any idea how to code BETWEEN in Excel?

Thanks,
GU
 
Neon520 said:
I tried to set up an IF criteria:

IF(A1>=10,True_Action1, Else IF(A1>=20, True_Action2, False_Action)

There's no 'ELSE' function in Excel. You're also missing a ')'.
It seems like the formula only perform True_Action1 because criteria
2 overlap criteria one as well. How can I fix this bug? I was thinking
changing criteria one to if A1 is between 10 and 19.99, but I don't
know how to code this.... Any idea how to code BETWEEN in Excel?

Rearrange your order of evaluation.

=IF(A1>=20,True_Action2,IF(A1>=10,True_Action1,False_Action))
 
One way:

=IF(AND(A1>=10,A1<20),true_action,false_action)

If you want to stick with your approach, change the order of the
testing:

IF(A1>=20,True_Action2, Else IF(A1>=10, True_Action1, False_Action)

Hope this helps.

Pete
 
Just realised that I copied your formula without checking it - should
be:

IF(A1>=20,True_Action2,IF(A1>=10, True_Action1, False_Action))

Pete
 
Maybe something like this:

=IF(AND(A1>=10,A1<=19.99),"True_Action","False_Action")

HTH,
Paul
 
Back
Top