Hi!
Note: in F9 I made a drop-down list so it can pick A or
B. Would that tamper with the formula?
No, that'll have no negative impact. The problem is that
the formula is not properly constructed.
I can't really see why you need to use A= this formula and
B= that formula unless A and B are related to specific and
separate criteria.
If you simply want to return different values based on the
value of G9, you could do this:
=IF(AND(G9>119,G9<241),240,IF(AND(G9>239,G9<481),480,""))
But, if you do need to base things on F9 equalling either
A or B here are a couple of ideas:
=IF(AND(F9="A",G9>119,G9<241),240,IF(AND
(F9="B",G9>239,G9<481),480,""))
Using this formula, if F9=A and G9>241 you'll get "". Not
sure that's what you want but that's how you're separate
formulas would have handled it.
Here's something that uses Jason's approach with a little
twist.
Create defined names for the 2 formulas:
A =IF(AND(G9>119,G9<241),240,"")
B =IF(AND(G9>239,G9<481),480,"")
Then use this formula:
=CHOOSE(MATCH(F9,{"A","B"},0),A,B)
This will work the same as the second formula I show above.
Biff