IF AND Function with < A Number > a Number

leamercedes22

New Member
Joined
Mar 15, 2018
Messages
3
I am having trouble with a formula and cant seem to figure out how to solve for.

I am trying to solve for a commission Plan. The Logic is if the Plan type is equal to A and the term of the contract is =<12 months than put Plan type A1, if equal to A and >12 months but <36 than apply plan A1A2, but if the term is over 36 months than you need A1A2A3, Otherwise ignore all that and just bring back what ever is in cell A3


Plan Type A3
Contract Term X3

So far I have this formula and its not working

=IF(AND(A3="A",X3<="12"),"A1",IF(AND(A3="A",X3>"12"),"A1A2",IF(AND(A3="A",X3>"36")"A3")))
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Welcome to the Board!

I haven't tried to analyze the logic in your formula yet, but I do see one potential problem that sticks out.

Note that when comparing numeric values, if your numbers are really entered as numbers and not text, do NOT use double-quotes! Those indicate Text, not Numeric entries.
So comparisons like this:
Code:
[COLOR=#333333]X3<="12"[/COLOR]
probably need to look like this:
Code:
[COLOR=#333333]X3<=12[/COLOR]
 
Last edited:
Upvote 0
Tried with and without Quotes and doesn't matter it still wont solve. Driving me bonkers. I really need to find a formula that will let me look at one cell than look at another and if its between 2 numbers than bring back a text and be able to do multiple nests of that logic
 
Upvote 0
Hi,

May be you can show some sample data and expected results?
 
Upvote 0
I think you need one tweak to your formula based upon what you wrote in your 1st post.

Try this:
Code:
[COLOR=#333333]=IF(AND(A3="A",X3<="12"),"A1",IF(AND(A3="A",X3>"12",[/COLOR][COLOR=#ff0000]X3<"36"[/COLOR][COLOR=#333333]),"A1A2",IF(AND(A3="A",X3>"36")"A3")))[/COLOR]

That being said I am not sure it will solve your issue.

Can you be more specific with what is happening now, what results do you get? Saying it won't solve is to generic to provide more feedback.
 
Upvote 0
Yup That's IT!!!!

the ending formula when applied to my actual sheet worked as

=IF(AND(AV3="A",X3<=12),"A1",IF(AND(AV3="A",X3>12,X3<=36),"A1A2",IF(AND(AV3="A",X3>36),"A1A2A3",AV3)))

Thank you.:)
 
Upvote 0
Yup That's IT!!!!

the ending formula when applied to my actual sheet worked as

=IF(AND(AV3="A",X3<=12),"A1",IF(AND(AV3="A",X3>12,X3<=36),"A1A2",IF(AND(AV3="A",X3>36),"A1A2A3",AV3)))

Thank you.:)

If that formula works for you, here's a shorter version that should work the same:


Book1
E
10
Sheet15
Cell Formulas
RangeFormula
E1=IF(AV3="A",IF(X3<=12,"A1",IF(X3<=36,"A1A2","A1A2A3")),AV3)
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top