View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
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 -