View previous topic :: View next topic 
Author 
Message 
braindeadbidule Newbie
Joined: 28 Jul 2010 Posts: 2

Posted: Wed Jul 28, 2010 1:04 am Post subject: Complex Question, hope you can help with this formula 


'AttPriority' accepts values from 1 to 6, each representing the order a series of options
1 A, B, C
2 A, C, B
3 C, B, A
4 C, A, B
5 B, A, C
6 B, C, A
I have 3 tables, each with a cell having the respective formulas
=(IF(OR(AttPriority=5;AttPriority=6);BQ2;IF(OR(AttPriority=2;AttPriority=3);BT2;IF(OR(AttPriority=4;AttPriority=1);BW2))))
=(IF(OR(AttPriority=3;AttPriority=4);BQ2;IF(OR(AttPriority=1;AttPriority=6);BT2;IF(OR(AttPriority=2;AttPriority=5);BW2))))
=(IF(OR(AttPriority=1;AttPriority=2);BQ2;IF(OR(AttPriority=4;AttPriority=5);BT2;IF(OR(AttPriority=3;AttPriority=6);BW2))))
'BQ2' currently equals 7
'BT2' currently equals 5
'BW2' currently equals 3
My goal is to have a formula that calculates one of the formulas above, minus a colum of variable numbers.
Ex:
=(IF(OR(AttPriority=5;AttPriority=6);BQ2;IF(OR(AttPriority=2;AttPriority=3);BT2;IF(OR(AttPriority=4;AttPriority=1);BW2))))SUM(BR18:BR20)
Thing is, at this time, the formula works perfectly except when the 'AttPriority' refers to 'BQ2' (value: 7). When the value is the greatest value of the 3 available values, it stops calculating it, and gives me only the equivalent of 0SUM(BR18:BR20)
I really do not know what to do to solve this problem. Help?
Thank you! 

Back to top 


Jens S Power User
Joined: 26 May 2008 Posts: 87 Location: Denmark

Posted: Wed Jul 28, 2010 6:35 am Post subject: 


Hi
I don't like these complex ifformulas, sometimes they end op with nothing.
Try CHOOSE:
=CHOOSE(AttPriority;BW2;BT2;BT2;BW2;BQ2;BQ2)
=CHOOSE(AttPriority;BT2;BW2;BQ2;BQ2;BW2;BT2)
=CHOOSE(AttPriority;BQ2;BQ2;BW2;BT2;BT2;BW2)
Jens 

Back to top 


braindeadbidule Newbie
Joined: 28 Jul 2010 Posts: 2

Posted: Wed Jul 28, 2010 12:08 pm Post subject: 


Thank you Jens,
I have replaced the formula with CHOOSE, but the problem remains...
2 examples with different 'AttPriority' variables
The biggest orange square, the one on the left, is 'AttPriority'
As you can see, whichever table is assigned the value '7' doesnt substract the "C" column data from the Orange total (3/5/7)
The formulas are the same for each
In the first table, with 'AttPriority' value of 5
The Orange Cell in BI16 is =CHOOSE(AttPriority;BW2;BT2;BT2;BW2;BQ2;BQ2)
The Yellow Cell in BI16 is =BG20(SUM(BR18:BR20))
But the forumula seems to ignore BG20 in the forumula, calculating it only as =(SUM(BR18:BR20))
... 

Back to top 




You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group
