| View previous topic :: View next topic |
| Author |
Message |
taob Newbie

Joined: 10 Nov 2008 Posts: 4 Location: Toronto, ON
|
Posted: Sun May 27, 2012 1:12 am Post subject: [SOLVED] Starting multiline cell with an equals sign |
|
|
I would like to enter a two-line string into a cell in Calc. The caveat is that the string starts with an equals sign, then the line break, then some more text. The equals sign is formatted in a smaller point size, and the text on the second line is larger and in bold.
Normally, I would prefix the string with a single quote ('), and the quote would be automatically removed from the contents of the cell, leaving the rest of the literal string behind.
However, when there is an embedded line break, the single quote remains. If I then manually remove the single quote, Calc sees the leading = sign and interprets the rest of the string as a reference or function. I've tried the form ="=text", with a newline between the second "=" and the word "text", but the newline is replaced by a space. I've tried =CONCATENATE("=";char(10);"text") which produces the correct string, but I lose the ability to format the string.
This appears to be a bug in the way a leading single-quote-then-equal-sign is handled, since it works with every other character I tried.
Any other ways I can get around this problem? _________________ - Brian
Last edited by taob on Sun May 27, 2012 4:37 am; edited 1 time in total |
|
| Back to top |
|
 |
Robert Tucker Moderator


Joined: 16 Aug 2004 Posts: 3367 Location: Manchester UK
|
|
| Back to top |
|
 |
Robert Tucker Moderator


Joined: 16 Aug 2004 Posts: 3367 Location: Manchester UK
|
Posted: Sun May 27, 2012 2:25 am Post subject: |
|
|
Actually I think you can do what you want if you start with a zero width space (Unicode U+FEFF) before the equals sign. _________________ LibreOffice 3.6.6 on Fedora 18, LibreOffice 4.0.2 on Ubuntu 13.04 (Double Boot) |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Sun May 27, 2012 2:26 am Post subject: |
|
|
Format the cells as text (number format code "@") before input. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1875 Location: Sydney, Australia
|
Posted: Sun May 27, 2012 2:27 am Post subject: |
|
|
Format the cell as Text
then type =
then press Ctrl+Enter
then press Ctrl+B
then type the text
then press Enter.
Ken Johnson _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
taob Newbie

Joined: 10 Nov 2008 Posts: 4 Location: Toronto, ON
|
Posted: Sun May 27, 2012 4:36 am Post subject: |
|
|
Thank you, Ken and and Villeroy! I think this is actually the first time I scrolled all the way down to the bottom of the format list and saw "Text". I figured since tab was called "Numbers", it was only for formatting of numeric data...
Robert: Ah yes, thanks for the reminder of the existence of the zero-width space. I had worked around the problem using a normal space and reducing it down to 1 pt. That still left about a 2-pixel gap, which messed up the alignment compared to the other cells. _________________ - Brian |
|
| Back to top |
|
 |
|