Oct 25 2023 09:33 AM
Hi
Anyone can help me convert the text formula into a real formula? i.e. in cell A1 there is a formula in text =4+2. now I want output as 6 in cell D3.
Oct 25 2023 10:24 AM
To convert a texted formula into a real formula in Excel, you can use the EVALUATE function, which allows you to evaluate a formula stored as text. Please note that the EVALUATE function is not a built-in Excel function, so you would need to create a custom VBA function for this purpose.
Here are the steps to create a custom VBA function for this:
Vba code:
Function EvaluateFormula(FormulaText As String)
Application.Volatile
EvaluateFormula = Evaluate(FormulaText)
End Function
Now, you can use the EvaluateFormula function to convert texted formulas into real formulas. In your example:
=EvaluateFormula(A1)
Cell D3 will now display the result of the formula in cell A1, which is 6.
Please note that using custom VBA functions requires enabling macros in your Excel settings.
The text was created with the help of AI.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and like it!
This will help all forum participants.
Oct 25 2023 09:57 PM
Oct 25 2023 11:34 PM - edited Oct 25 2023 11:37 PM
@Manishexcel -Please check this . Create a named formula and add =EVALUATE(Link the cell you want to evaluate)
Was the answer useful? Mark as best response and like it!
This will help all forum participants.