ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Between one number and another (https://www.excelbanter.com/excel-worksheet-functions/173119-between-one-number-another.html)

Neon520

Between one number and another
 
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

Harlan Grove[_2_]

Between one number and another
 
Neon520 wrote...
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,Fal se_Action))

Mike H

Between one number and another
 
Perhaps this

=IF(AND(A1=10,A1<=19.99),"Do this for true","Do this for false")

Mike

"Neon520" wrote:

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


Pete_UK

Between one number and another
 
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

On Jan 15, 5:35*pm, Neon520 wrote:
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



Pete_UK

Between one number and another
 
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

On Jan 15, 5:45*pm, Pete_UK wrote:
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

On Jan 15, 5:35*pm, Neon520 wrote:



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- Hide quoted text -


- Show quoted text -



PCLIVE

Between one number and another
 
Maybe something like this:

=IF(AND(A1=10,A1<=19.99),"True_Action","False_Act ion")

HTH,
Paul


--

"Neon520" wrote in message
...
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

Between one number and another
 
THANKS A LOT FOR ALL OF THESE HELPFUL ANSWERS, EVERYONE!!!


"PCLIVE" wrote:

Maybe something like this:

=IF(AND(A1=10,A1<=19.99),"True_Action","False_Act ion")

HTH,
Paul


--

"Neon520" wrote in message
...
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






All times are GMT +1. The time now is 05:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com