operation in one cell and result in another one
operation in one cell and result in another one
I need to know if there is a function to have de operation in one cell [(3+4)*2], and the result in onother [14]. Thank you
Re: operation in one cell and result in another one
A1 =some calculation
B1: =A1 (link to A1)
B1: =A1 (link to A1)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: operation in one cell and result in another one
Hello Villeroy:
Thank you for your answer, but it doesn't work. May be I don't give a good explanation about it.
What I need is to see the operation in on cell, for instance A1: (2+3)*4, without the (=) sign and in another one B1: 20, the result of the operation.
I try with this A1: (2+3)*4, B1: ="="&A1, but what I got was, B1: =(2+3)*4 and not the result althoug the cell is formated as number.
I try too, de function Value(), but it doesn't work.
Thank you for your answer, but it doesn't work. May be I don't give a good explanation about it.
What I need is to see the operation in on cell, for instance A1: (2+3)*4, without the (=) sign and in another one B1: 20, the result of the operation.
I try with this A1: (2+3)*4, B1: ="="&A1, but what I got was, B1: =(2+3)*4 and not the result althoug the cell is formated as number.
I try too, de function Value(), but it doesn't work.
Re: operation in one cell and result in another one
No, this can not work. There is no function for evaluation of strings. Use scenarios for exchanging calculation models.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
- Hagar Delest
- Moderator
- Posts: 32687
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: operation in one cell and result in another one
Just a proposal.
A1: 3
B1: 4
C1: 2
A2: ="("&A1&"+"&B1&")*"&C1
B2: =(A1+B1)*C1
Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
A1: 3
B1: 4
C1: 2
A2: ="("&A1&"+"&B1&")*"&C1
B2: =(A1+B1)*C1
Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
Re: operation in one cell and result in another one
In Excel I use a User Defined Function, like this, but I do not known the translation for Open Office, do you?
Function Total(contenido As String)
Dim K As Integer
Dim L As Double
On Error GoTo fin
For K = 1 To Len(contenido)
If Mid(contenido, K, 1) = "," Then Mid(contenido, K, 1) = "."
Next
L = Evaluate(contenido)
If L = Error Then Total = "" Else Total = L
fin:
End Function
Thank you
Function Total(contenido As String)
Dim K As Integer
Dim L As Double
On Error GoTo fin
For K = 1 To Len(contenido)
If Mid(contenido, K, 1) = "," Then Mid(contenido, K, 1) = "."
Next
L = Evaluate(contenido)
If L = Error Then Total = "" Else Total = L
fin:
End Function
Thank you
Re: operation in one cell and result in another one
It is impossible to do this since there is no built-in equivalent to function "evaluate".
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: operation in one cell and result in another one
This question has arisen a couple of times. The answer is simply "No. It can't be done." So far as I know, it requires "parsing" the "text" content of a cell, and that is a low-level programming responsibility. My question remains: "Why do it"? What is the advantage?
David.
David.
Re: operation in one cell and result in another one
When you have to calculate the cost of a building or of a task, you have to make the computation, you need to have the operation first an then get the result. It is very important to control this values, If you can see the operation, anyone can control it, and then beside you achieved the wright value.
In Qpro I get this simply with de Value() function of the operation without the (=) sign, in Excel y can get it with the function I said before, in OOoffice ???
In Qpro I get this simply with de Value() function of the operation without the (=) sign, in Excel y can get it with the function I said before, in OOoffice ???
Re: operation in one cell and result in another one
Can you use the reverse, then? The function FORMULA() returns the formula entered in a cell as text. That should provide opportunity for visual inspection of the formula.
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
- kingfisher
- Volunteer
- Posts: 2123
- Joined: Tue Nov 20, 2007 10:53 am
Re: operation in one cell and result in another one
What about doing it the other way around? Put the calculation in B1, which will display the result and in A1 =FORMULA(B1) which will show the formula you have in B1.
Apache OpenOffice 4.1.9 on Linux
Re: operation in one cell and result in another one
It is a very good choice, I believe that this can work. I am going to try it.
Thank you very much
Thank you very much
Re: operation in one cell and result in another one
You can also easily get rid of the "=" sign through string manipulations if you wish.
David.
David.