excel 's evaluate Function

Is there e way to implement the excel's Function 'evaluate' in Libreoffice?

In many of my spradsheets i have to show the complete formula and the result of it in a separate cell.

The Result Cell in Excel contains an easy VB-macro. In the first cell there is the formula in text without the '=' at the beginning. In the reult cell i only type '=eval(A1)'

the macro in excel: result = Application.Evaluate("=" & Formula)

btw: that's the only reason why i'm using excel and calc at all :-)

edit retag close merge delete

1

Why would you do it this way, and not the opposite? if you need to display formula, you might put =FORMULA(B1) into A1.

( 2017-11-18 17:00:09 +0200 )edit

Sort by » oldest newest most voted

i found the extension "Display Formula and Result (Value) simultaneously". It's helpful but its not the same i mean, beacause every time, i edit the formula, i must activate it again.

more

What about the comment on the question by @Mike Kagansky ?
As you described what you want to achieve that comment contains the definite solution.
An EVALUATE() function can only be of use if you want to vary the formula by text manipulations.
AFAIK: For Calc such a function is neither implemented on the level of formulas in sheets nor on the api level (or directly in BASIC e.g). To get the functionality based on the api as it is would require (imo) rather subtle user programming.

( 2017-12-06 12:09:42 +0200 )edit

Already indicated by @Mike Kaganski and @Lupp, it is not necessary to install an extension for this. If you type the following into your cell B1, then it is automatically updated whenever you change the formula in cell A1:

="Formula: " & FORMULA(A1) & "  ;   Value:  " & A1


HTH, lib

( 2017-12-06 15:34:12 +0200 )edit