How to put comments within formulas
Has anyone played around with putting comments or labels within formulas? What I mean is to have a formula with several arguments, with some of them individually labeled with text.
If the arguments are cells, this often happens automatically if you have Use header cell names as references on, but in my situation, the source arguments only exist in the formula. And comments are nice, but they attach to the entire cell, not individual arguments.
What I'd like to do is a formula like this:
= 25 + 50
where I can tell that 25 is the number from May and 50 is the number from June.
Something like this would be ideal:
= 25["May"] + 50["June"]
but since there is not support for that in Numbers, the only way to do something like this is to fake it.
I have found three solutions:
=REPLACE("May",1,99,"25") + REPLACE("June",1,99,"50")
=IFERROR( NOT("May"), 25) + IFERROR( NOT("June"), 50)
=IF(TRUE,25,"May") + IF(TRUE,50,"June")
I prefer the last one, but none are particularly elegant. I wish I could find a single formula that takes just two arguments, the string and the value, and always outputs the value. The challenge is most formulas take cells or boolean expressions, not strings.
Can anyone else think of a more efficient way to do this?
.
MacBook Pro (17-inch Late 2011), Mac OS X (10.7.4)