R
rgl2sa
Hi, I may have too many conditions, but I am hoping to achievs the desired
Var% as indicated in column D. The goal is to always get the the 'Var%' to be
the same sign (ie +/-) as the 'Variance' except when the 'Budget' = 0 where
another set of conditions apply. The closest I can get is:
=IF(B25=0,IF(AND(A25<0),-1,IF(AND(A25>0),1,0)),IF(C25>=0,IF(AND(B25>0),(C25/B25),IF(AND(B25<0),(-C25/B25),IF(C25<=0,IF(AND(B25<0),(-C25/B25),IF(AND(B25>0),(C25/B25))))))))
Am I on track and can anyone add to this - or is there a totally different
approach that someone can suggest?
Thanks!!!
Actual Budget Variance Var%
-150 -100 -50 -50.00%
0 0 0 0.00%
150 0 150 100.00%
-150 0 -150 -100.00%
-150 100 -250 -250.00%
150 100 50 50.00%
-100 -100 0 0.00%
100 100 0 0.00%
-101 -100 -1 -1.00%
0 0 0 0.00%
1 0 1 100.00%
-1 0 -1 -100.00%
-1 100 -101 -101.00%
101 100 1 1.00%
-100 -100 0 0.00%
100 100 0 0.00%
99 100 -1 -1.00%
-99 -100 1 1.00%
-500 -100 -400 -400.00%
500 100 400 400.00%
-500 100 -600 -600.00%
500 -100 600 600.00%
Var% as indicated in column D. The goal is to always get the the 'Var%' to be
the same sign (ie +/-) as the 'Variance' except when the 'Budget' = 0 where
another set of conditions apply. The closest I can get is:
=IF(B25=0,IF(AND(A25<0),-1,IF(AND(A25>0),1,0)),IF(C25>=0,IF(AND(B25>0),(C25/B25),IF(AND(B25<0),(-C25/B25),IF(C25<=0,IF(AND(B25<0),(-C25/B25),IF(AND(B25>0),(C25/B25))))))))
Am I on track and can anyone add to this - or is there a totally different
approach that someone can suggest?
Thanks!!!
Actual Budget Variance Var%
-150 -100 -50 -50.00%
0 0 0 0.00%
150 0 150 100.00%
-150 0 -150 -100.00%
-150 100 -250 -250.00%
150 100 50 50.00%
-100 -100 0 0.00%
100 100 0 0.00%
-101 -100 -1 -1.00%
0 0 0 0.00%
1 0 1 100.00%
-1 0 -1 -100.00%
-1 100 -101 -101.00%
101 100 1 1.00%
-100 -100 0 0.00%
100 100 0 0.00%
99 100 -1 -1.00%
-99 -100 1 1.00%
-500 -100 -400 -400.00%
500 100 400 400.00%
-500 100 -600 -600.00%
500 -100 600 600.00%