7+ if statements
You forgot "harder to maintain".
"Ron Rosenfeld" wrote in message
...
On Sun, 20 Feb 2005 19:59:53 +1100, "Steve" wrote:
Antonyo
Nice work. Hard to read though!!
Ron
Try:
= $E7="A" * $D7*'Alloc'!E$7 + $E7="B"*$D7*'Alloc'!E$10 +
$E7="C"*$D7*'Alloc'! and so on.
Explanation
If E7 = A, this is interpretted as 1, that part of your formula becomes
1*$D7*'Alloc'!E$7
When E7 is anything except 'A', E7=A is interpressted as 0. That part of
the formula becomes 0*$D7*'Alloc'!E$7 (ie 0)
When you group them all together, read the '+' sign as a separation
between
each part of the formula and it becomes simple to read.
HTH
Steve
Sure seems a lot more complicated and less flexible than a lookup table.
--ron
|