how do i include a cell value in a line of text, thought it would be something like this
="attending are" & data;Q54 & " people"
but not working
anyone know the correct way ?
[Solved] Cell value in a text string
[Solved] Cell value in a text string
Last edited by IGraham on Sat Feb 26, 2011 6:21 pm, edited 2 times in total.
LibreOffice 3.5.1.2 on W7 64x
- Hagar Delest
- Moderator
- Posts: 32666
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Cell value in a text string
Why not just:
="attending are" & Q54 & " people"
If it doesn't work, can you upload a sample file (see How to attach a document here)?
Please add '[Solved]' at the beginning of your first post title (edit button) if your issue has been fixed.
="attending are" & Q54 & " people"
If it doesn't work, can you upload a sample file (see How to attach a document here)?
Please add '[Solved]' at the beginning of your first post title (edit button) if your issue has been fixed.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Re: Cell value in a text string
and there was me going more and more complex
thanks
thanks
LibreOffice 3.5.1.2 on W7 64x
Re: [Solved] Cell value in a text string
You were on the right track, I think.and there was me going more and more complex
Although it's not needed in the simplest case, it's often handy to use the TEXT function to apply a specific format when the value is inserted:
="attending are " & TEXT(Q54;"0") & " people" gives attending are 27 people, rounding the value to the nearest integer. The format code here is "0"; you can see the format codes when you use the Format > Cells > Numbers dialog: look near the bottom of the dialog window.
Another approach can be useful if you need the value to be displayed as part of some longer text, but still be available for calculations. In that case, you can add the text directly as part of a custom number format, under Format > Cells > Numbers, with something like:
"attending are" 0 "people". The number format code, 0, will show the rounded value when the cell is displayed, with the text on either side.
AOO4/LO5 • Linux • Fedora 23