breadzeppelin
New Member
- Joined
- Jun 11, 2020
- Messages
- 10
- Office Version
- 365
- Platform
- Windows
Hi all, I hope you are safe and well...
This should be relatively easy, and I'm sure I'm missing a trick...
Ok - The reasons why I'm doing this would probably take a while to explain, but the high level gist of it is this:
I have a cell (e.g. cell D1) that contains a formula as text (itself generated by formula from a number of other text strings etc.) e.g.: ="=IF("&A1&"=6,"&B1&","&C1&")"
and say:
Cell A1 contains the text value of: $X1
Cell B1 contains the text value of: $Y1
Cell C1 contains the text value of: $Z1
Which displays the formula in D1 (as text): =IF($X1=6,$Y1,$Z1)
Now - what I want to do is in cell D20 get the actual value from the formula (stored as text) in cell: D1 i.e. what does the formula: =IF($X1=6,$Y1,$Z1) evaluate to?
I thought something like =INDIRECT(D1) would do the trick, but that doesn't seem to work... and I don't think Excel still has the evaluate function any more, but I could be wrong?
I can do this reasonably easily with VBA or a custom function, but ideally I want to avoid that if possible (basically so it doesn't require a manual step to execute, a change event or a custom function that may not work for another user).
Anyone got a great way to achieve this?
Thanks for the help!
Oz
This should be relatively easy, and I'm sure I'm missing a trick...
Ok - The reasons why I'm doing this would probably take a while to explain, but the high level gist of it is this:
I have a cell (e.g. cell D1) that contains a formula as text (itself generated by formula from a number of other text strings etc.) e.g.: ="=IF("&A1&"=6,"&B1&","&C1&")"
and say:
Cell A1 contains the text value of: $X1
Cell B1 contains the text value of: $Y1
Cell C1 contains the text value of: $Z1
Which displays the formula in D1 (as text): =IF($X1=6,$Y1,$Z1)
Now - what I want to do is in cell D20 get the actual value from the formula (stored as text) in cell: D1 i.e. what does the formula: =IF($X1=6,$Y1,$Z1) evaluate to?
I thought something like =INDIRECT(D1) would do the trick, but that doesn't seem to work... and I don't think Excel still has the evaluate function any more, but I could be wrong?
I can do this reasonably easily with VBA or a custom function, but ideally I want to avoid that if possible (basically so it doesn't require a manual step to execute, a change event or a custom function that may not work for another user).
Anyone got a great way to achieve this?
Thanks for the help!
Oz