I learned from this question that I can declare variables in Excel by naming cells. Now I'm wondering whether it'd be possible to parse text in a cell to call this variable.
Say I name cell A1 "var1", and assign it the value 0.5
, and cell A2 "var2" with the value 0.75
. Then I want to do the following:
B C D
1 var1 10 =B1*C1
2 var2 10 =B2*C2
3 var2 10 =B3*C3
4 var2 10 =parse(B4)*C4
5 var1 10 =CELL(B5)*C5
6 var1 10 =VALUE(B6)*C6
that is, multiply the values in column D
by either var1
or var2
, which is read from the same row in column C
. Rows 4, 5, and 6 show some unsuccessful attempts of what I have in mind.