Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 129
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default 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))
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default 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 -




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default 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



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 129
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
countif formula to find the occurances of a number that is greater than one number but less than another steveo Excel Discussion (Misc queries) 3 July 8th 06 02:04 AM
convert text-format number to number in excel 2000%3f Larry Excel Discussion (Misc queries) 1 July 29th 05 08:18 PM
Count number of times a specific number is displayed in a cell ran subs Excel Worksheet Functions 1 June 27th 05 05:01 PM
excel format cells/Number/Category: Number problem Matts Excel Discussion (Misc queries) 5 December 9th 04 09:47 PM
Rounding a number to a multiple quantity that adds to a fixed total number wjlo Excel Worksheet Functions 1 November 9th 04 04:43 PM


All times are GMT +1. The time now is 09:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"