Hi
I would like to calculate a formula in a cell that has other text as well, for example:
In cell A1: Hello world. 8+9
I would like to extract the formula and calculated it, how?
Many thanks!
Stefan
Hi
I would like to calculate a formula in a cell that has other text as well, for example:
In cell A1: Hello world. 8+9
I would like to extract the formula and calculated it, how?
Many thanks!
Stefan
Can you give more typical examples?
Is there a consistent pattern? I.e. Is it always at the end, etc..?
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Hi, thanks for replying.
In fact, excactly what I am doing is like this: I am pulling numbers and operators (+, -, * or /) from different cell like this:
A1: 8
A2: +
A3: 9
A4: ="="&A1&A2&A3
The problem is that the result in cell A4 becomes =8+9 and not the actual result of the calculation 17 , which is what I am looking for. This might seem different from my original question, but basically I would like the text to be converted to a formula that could be calculated.
Many thanks again!
There is no straight function in Excel to do that, but there are ways..
...one of the easiest is to download and install a free addin from here: Morefunc.xll and then use formula:
=EVAL(A1&A2&A3)
If you're unable to install the add-in another route would be to use a UDF to mimic the morefunc function:
The above, stored in a Module, can be called from the cell usingPlease Login or Register to view this content.
You can also use Names in similar vein but if the construct of the formula is not consistent you may end up needing to use more cells than either of the above suggestionsPlease Login or Register to view this content.
(ie construct formula in one cell and evaluate in another)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
The EVAL() formula worked great, thanks! And thanks to you too DonkeyOte for the input!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks