G
Guest
I've been trying to write a formula that evaluates separately several series
of numbers and what I came up with is a formula like this:
=IF(AND(L8<8000,SUM(B8:L8)<8000),L8*$B$72,IF(SUM(B8:K8)>8000,0,((SUM(B8:K8)-8000)*-$B$72))+IF(AND(L17<8000,SUM(B17:L17)<8000),L17*$B$72,IF(SUM(B17:K17)>8000,0,((SUM(B17:K17))-8000)*-$B$72))+IF(AND(L26<8000,SUM(B26:L26)<8000),L26*$B$72,IF(SUM(B26:K26)>8000,0,((SUM(B26:K26))-8000)*-$B$72))+IF(AND(L35<8000,SUM(B35:L35)<8000),L35*$B$72,IF(SUM(B35:K35)>8000,0,(SUM(B35:K35)-8000)*-$B$72))+IF(AND(L44<8000,SUM(B44:L44)<8000),L44*$B$72,IF(SUM(B44:K44)>8000,0,((SUM(B44:K44))-8000)*-$B$72))+IF(AND(L53<8000,SUM(B53:L53)<8000),L53*$B$72,IF(SUM(B53:K53)>8000,0,(SUM(B53:K53)-8000)*-$B$72)))
What I was hoping for was that the first "if statement" would be answered,
then the second, etc. What actually happens is that if the any of the "if
statements" result in 0, then the formula just quits and doesn't continue
evaluating the remaining "if statements". What am I doing wrong?
Thanks for your help!
of numbers and what I came up with is a formula like this:
=IF(AND(L8<8000,SUM(B8:L8)<8000),L8*$B$72,IF(SUM(B8:K8)>8000,0,((SUM(B8:K8)-8000)*-$B$72))+IF(AND(L17<8000,SUM(B17:L17)<8000),L17*$B$72,IF(SUM(B17:K17)>8000,0,((SUM(B17:K17))-8000)*-$B$72))+IF(AND(L26<8000,SUM(B26:L26)<8000),L26*$B$72,IF(SUM(B26:K26)>8000,0,((SUM(B26:K26))-8000)*-$B$72))+IF(AND(L35<8000,SUM(B35:L35)<8000),L35*$B$72,IF(SUM(B35:K35)>8000,0,(SUM(B35:K35)-8000)*-$B$72))+IF(AND(L44<8000,SUM(B44:L44)<8000),L44*$B$72,IF(SUM(B44:K44)>8000,0,((SUM(B44:K44))-8000)*-$B$72))+IF(AND(L53<8000,SUM(B53:L53)<8000),L53*$B$72,IF(SUM(B53:K53)>8000,0,(SUM(B53:K53)-8000)*-$B$72)))
What I was hoping for was that the first "if statement" would be answered,
then the second, etc. What actually happens is that if the any of the "if
statements" result in 0, then the formula just quits and doesn't continue
evaluating the remaining "if statements". What am I doing wrong?
Thanks for your help!