Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenWed, 19 Apr 2017 01:07:24 +0200How to fill a formula with functions and plain text or uninterpreted characters?https://ask.libreoffice.org/en/question/18082/how-to-fill-a-formula-with-functions-and-plain-text-or-uninterpreted-characters/I saw [this page](https://help.libreoffice.org/Math/Entering_Text) on the wiki but i don't seem to understand this at all.
Say that I have values in cells C1 and C2, that are the result of functions. Let's say that their respective values are 50 and 60. Now, I want cell C3 to show:
(50 - 60)
How do I do that? I tried using
=(C1 "-" C2)
But I get an Err:509
I think I tried all combinations, with either {}{} or "" around every single character (dash, brackets...) and even the VALUE() function for each cell name...
Any idea?
I guess it is the same as asking how to integrate a cell value in a sentence, say I want to have in a cell something like "I have a value of [cell C1] for this".
Cheers
Sun, 26 May 2013 07:28:03 +0200https://ask.libreoffice.org/en/question/18082/how-to-fill-a-formula-with-functions-and-plain-text-or-uninterpreted-characters/Comment by hoja420 for <p>I saw <a href="https://help.libreoffice.org/Math/Entering_Text">this page</a> on the wiki but i don't seem to understand this at all.</p>
<p>Say that I have values in cells C1 and C2, that are the result of functions. Let's say that their respective values are 50 and 60. Now, I want cell C3 to show:</p>
<pre><code>(50 - 60)
</code></pre>
<p>How do I do that? I tried using</p>
<pre><code>=(C1 "-" C2)
</code></pre>
<p>But I get an Err:509
I think I tried all combinations, with either {}{} or "" around every single character (dash, brackets...) and even the VALUE() function for each cell name...</p>
<p>Any idea?</p>
<p>I guess it is the same as asking how to integrate a cell value in a sentence, say I want to have in a cell something like "I have a value of [cell C1] for this".</p>
<p>Cheers</p>
https://ask.libreoffice.org/en/question/18082/how-to-fill-a-formula-with-functions-and-plain-text-or-uninterpreted-characters/?comment=89283#post-id-89283The question is, of course, relevant, and always fresh for us the ignorant, Mr. Kemp.
Google results for "*libreoffice formula and text*" took me here.
**MY ANSWER:**
insert =C1&" "&"-"&" "&C2Sat, 04 Mar 2017 16:57:48 +0100https://ask.libreoffice.org/en/question/18082/how-to-fill-a-formula-with-functions-and-plain-text-or-uninterpreted-characters/?comment=89283#post-id-89283Comment by chtfn for <p>I saw <a href="https://help.libreoffice.org/Math/Entering_Text">this page</a> on the wiki but i don't seem to understand this at all.</p>
<p>Say that I have values in cells C1 and C2, that are the result of functions. Let's say that their respective values are 50 and 60. Now, I want cell C3 to show:</p>
<pre><code>(50 - 60)
</code></pre>
<p>How do I do that? I tried using</p>
<pre><code>=(C1 "-" C2)
</code></pre>
<p>But I get an Err:509
I think I tried all combinations, with either {}{} or "" around every single character (dash, brackets...) and even the VALUE() function for each cell name...</p>
<p>Any idea?</p>
<p>I guess it is the same as asking how to integrate a cell value in a sentence, say I want to have in a cell something like "I have a value of [cell C1] for this".</p>
<p>Cheers</p>
https://ask.libreoffice.org/en/question/18082/how-to-fill-a-formula-with-functions-and-plain-text-or-uninterpreted-characters/?comment=93030#post-id-93030Thank you, @hoja420 ! We can even do simpler: =C1&" - "&C2Wed, 19 Apr 2017 01:07:24 +0200https://ask.libreoffice.org/en/question/18082/how-to-fill-a-formula-with-functions-and-plain-text-or-uninterpreted-characters/?comment=93030#post-id-93030Answer by karolus for <p>I saw <a href="https://help.libreoffice.org/Math/Entering_Text">this page</a> on the wiki but i don't seem to understand this at all.</p>
<p>Say that I have values in cells C1 and C2, that are the result of functions. Let's say that their respective values are 50 and 60. Now, I want cell C3 to show:</p>
<pre><code>(50 - 60)
</code></pre>
<p>How do I do that? I tried using</p>
<pre><code>=(C1 "-" C2)
</code></pre>
<p>But I get an Err:509
I think I tried all combinations, with either {}{} or "" around every single character (dash, brackets...) and even the VALUE() function for each cell name...</p>
<p>Any idea?</p>
<p>I guess it is the same as asking how to integrate a cell value in a sentence, say I want to have in a cell something like "I have a value of [cell C1] for this".</p>
<p>Cheers</p>
https://ask.libreoffice.org/en/question/18082/how-to-fill-a-formula-with-functions-and-plain-text-or-uninterpreted-characters/?answer=18083#post-id-18083Hallo
="( "&C1&" - "&C2&" )"
KarolusSun, 26 May 2013 07:56:39 +0200https://ask.libreoffice.org/en/question/18082/how-to-fill-a-formula-with-functions-and-plain-text-or-uninterpreted-characters/?answer=18083#post-id-18083Comment by chtfn for <p>Hallo</p>
<p>="( "&C1&" - "&C2&" )"</p>
<p>Karolus</p>
https://ask.libreoffice.org/en/question/18082/how-to-fill-a-formula-with-functions-and-plain-text-or-uninterpreted-characters/?comment=18085#post-id-18085Great, this works! Could you explain in more details what is the role of each character? I'm not sure I understand. "" is to mark the limits of the plain text, and & is used to separate actual formula elements from the rest?Sun, 26 May 2013 10:30:26 +0200https://ask.libreoffice.org/en/question/18082/how-to-fill-a-formula-with-functions-and-plain-text-or-uninterpreted-characters/?comment=18085#post-id-18085Comment by oweng for <p>Hallo</p>
<p>="( "&C1&" - "&C2&" )"</p>
<p>Karolus</p>
https://ask.libreoffice.org/en/question/18082/how-to-fill-a-formula-with-functions-and-plain-text-or-uninterpreted-characters/?comment=18101#post-id-18101"( " is the first string, then the value of C1, then the string " - ", then the value of C2, and lastly the string " )". The ampersands are the concatenating characters.Sun, 26 May 2013 16:47:48 +0200https://ask.libreoffice.org/en/question/18082/how-to-fill-a-formula-with-functions-and-plain-text-or-uninterpreted-characters/?comment=18101#post-id-18101