Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenThu, 09 Feb 2017 06:34:35 +0100How do I calculate a sum in a cell as well as showing text in the same cell?https://ask.libreoffice.org/en/question/87278/how-do-i-calculate-a-sum-in-a-cell-as-well-as-showing-text-in-the-same-cell/Just as the title suggests.
For example I want cell C1 to display the total of cells A1 ad B1, (=A1+B1) as well as some text unrelated to the calculation as well.
How would the formula look?
Each time I enter text anywhere in the cell (C1) it just screws up the calculation. I have tried putting it before and after the calculation, have tried using quotation marks too.
Can this be done, and if so, how?
Many thanks!Thu, 09 Feb 2017 06:00:12 +0100https://ask.libreoffice.org/en/question/87278/how-do-i-calculate-a-sum-in-a-cell-as-well-as-showing-text-in-the-same-cell/Answer by robleyd for <p>Just as the title suggests.
For example I want cell C1 to display the total of cells A1 ad B1, (=A1+B1) as well as some text unrelated to the calculation as well.
How would the formula look?</p>
<p>Each time I enter text anywhere in the cell (C1) it just screws up the calculation. I have tried putting it before and after the calculation, have tried using quotation marks too.</p>
<p>Can this be done, and if so, how?</p>
<p>Many thanks!</p>
https://ask.libreoffice.org/en/question/87278/how-do-i-calculate-a-sum-in-a-cell-as-well-as-showing-text-in-the-same-cell/?answer=87280#post-id-87280Use the ampersand to concatenate text and formula result; for example, if A1 is 16 and A2 is 12 `="Foobar "& A1+A2` will display Foobar 28Thu, 09 Feb 2017 06:34:35 +0100https://ask.libreoffice.org/en/question/87278/how-do-i-calculate-a-sum-in-a-cell-as-well-as-showing-text-in-the-same-cell/?answer=87280#post-id-87280Answer by Mike Kaganski for <p>Just as the title suggests.
For example I want cell C1 to display the total of cells A1 ad B1, (=A1+B1) as well as some text unrelated to the calculation as well.
How would the formula look?</p>
<p>Each time I enter text anywhere in the cell (C1) it just screws up the calculation. I have tried putting it before and after the calculation, have tried using quotation marks too.</p>
<p>Can this be done, and if so, how?</p>
<p>Many thanks!</p>
https://ask.libreoffice.org/en/question/87278/how-do-i-calculate-a-sum-in-a-cell-as-well-as-showing-text-in-the-same-cell/?answer=87279#post-id-87279You may enter formula like this:
="This is sum: " & A1+B1 & " dollars"
Or you may use cell's (style's) number format to add text beside number, like this:
"Sum: " # ##0,00 " cups"
The latter allows you to continue using the cell in further calculations (it only affects appearance; the inner cell contents is still the number).Thu, 09 Feb 2017 06:28:55 +0100https://ask.libreoffice.org/en/question/87278/how-do-i-calculate-a-sum-in-a-cell-as-well-as-showing-text-in-the-same-cell/?answer=87279#post-id-87279