Hi Valerie
I believe you can replace this giant-IF with something much simpler. If I understand it correctly (a hard job with this much ifs), you can construct a lookup table. I propose to place the following in one column
0
10000
15000
20000
25000
& the following in a column next to the previous
E0
D0
C0
B0
A0
& what follows in a column next to the previous
E1
D1
C1
B1
A1
Select these 3-column of values and name it, e.g., VALUES.
Then use the following VLOOKUP-formula instead:
=VLOOKUP(O4,VALUES,IF(BW4,3,2),1)
BTW, what are these A0, A1,etc.? Cell addresses? If so, replace them as required by Excel.
Aladin
Aladin and I are heading down the same path...
Here's my 1st stab at it...
=VLOOKUP(O4,{0,"E";10000,"D";15000,"C";20000,"B";25000,"A"},2)&BW4
Re: Aladin and I are heading down the same path...
No objection. The objective is to kill that monstruous IF if we can.
Aladin, You ROCK!!! Thanks!!!
Hi there, try breaking your formula into two.
in A1 put
=IF(AND(O4>24999,BW4=1),"A1",IF(AND(O4>24999,BW4=0),"A0",IF(AND(AND(O4<25000,O4>19999),BW4=1),"B1",IF(AND(AND(O4<25000,O4>19999),BW4=0),"B0",IF(AND(AND(O4<20000,O4>14999),BW4=1),"C1",B1)))))
In B1 put
=IF(AND(AND(O4<20000,O4>14999),BW4=0),"C0",IF(AND(AND(O4<15000,O4>9999),BW4=1),"D1",IF(AND(AND(O4<15000,O4>9999),BW4=0),"D0",IF(AND(O4<10000,BW4=1),"E1",IF(AND(O4<10000,BW4=0),"E0",0)))))
This formula should work fine. Hope so
Mo