OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[SOLVED] Starting multiline cell with an equals sign

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
taob
Newbie
Newbie


Joined: 10 Nov 2008
Posts: 4
Location: Toronto, ON

PostPosted: Sun May 27, 2012 1:12 am    Post subject: [SOLVED] Starting multiline cell with an equals sign Reply with quote

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
View user's profile Send private message Visit poster's website
Robert Tucker
Moderator
Moderator


Joined: 16 Aug 2004
Posts: 3407
Location: Manchester UK

PostPosted: Sun May 27, 2012 2:22 am    Post subject: Reply with quote

See if these threads help:

http://www.oooforum.org/forum/viewtopic.phtml?t=123399
http://www.oooforum.org/forum/viewtopic.phtml?t=123171
_________________
OpenOffice 4.0.0 and LibreOffice 4.x.x on Fedora 20, Ubuntu 13.10, Windows 8.1 Preview (Triple Boot)
Back to top
View user's profile Send private message
Robert Tucker
Moderator
Moderator


Joined: 16 Aug 2004
Posts: 3407
Location: Manchester UK

PostPosted: Sun May 27, 2012 2:25 am    Post subject: Reply with quote

Actually I think you can do what you want if you start with a zero width space (Unicode U+FEFF) before the equals sign.
_________________
OpenOffice 4.0.0 and LibreOffice 4.x.x on Fedora 20, Ubuntu 13.10, Windows 8.1 Preview (Triple Boot)
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Sun May 27, 2012 2:26 am    Post subject: Reply with quote

Format the cells as text (number format code "@") before input.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Sun May 27, 2012 2:27 am    Post subject: Reply with quote

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
View user's profile Send private message
taob
Newbie
Newbie


Joined: 10 Nov 2008
Posts: 4
Location: Toronto, ON

PostPosted: Sun May 27, 2012 4:36 am    Post subject: Reply with quote

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". Embarassed 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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group