Ask Your Question

Calc: How to enter equal sign as text [closed]

asked 2017-11-07 15:05:32 +0200

LebSteve gravatar image

updated 2020-07-27 15:42:32 +0200

Alex Kemp gravatar image

How do I format a cell so that characters such as a leading equal sign are interpreted as text?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-07-27 15:42:38.784330

2 Answers

Sort by » oldest newest most voted

answered 2017-11-07 15:11:58 +0200

Lupp gravatar image

updated 2019-07-28 03:31:12 +0200

EasyTrieve gravatar image

Set the number format code for the respective cell to @ in advance.
If you don't like that, and you don't expect Calc to recognize the = Something Or Other as a text constant, you can enter ="= Something Or Other"; which displays = Something Or Other.

edit flag offensive delete link more


Formatting to Text to force any subsequent input to literal text is correct, a constant formula expression is unnecessary overhead.

erAck gravatar imageerAck ( 2017-11-07 15:18:42 +0200 )edit

There are points of view. And "correct" is a doubtable term here. It works - within limits. You may prefer it.
If you want to use the cell next time for a formula again you will need to change the setting again e.g. Disadvantage?
Even the @ setting does not allow to enter - - - as text e.g. (old bug) "such as ... equal sign ..." were the words in the question.
But probably my comment is unnecessary overhead again.

Lupp gravatar imageLupp ( 2017-11-07 16:02:05 +0200 )edit

I'd suppose that not treating ' before formulas the same way as before numbers is a usability bug. Having seen the ' before something that could be otherwise translated to a formula should just tell LO to write the rest of the string to the string content, without the ' itself; and the reverse process should happen when displaying ...

Mike Kaganski gravatar imageMike Kaganski ( 2019-07-28 07:50:03 +0200 )edit

Even the @ setting does not allow to enter - - - as text

It does, if you answer the dialog about formula correction with No or hit Escape, but the dialog even showing up (and thus the attempt to compile the input as formula) on a Text formatted cell I'd consider as bug.

erAck gravatar imageerAck ( 2019-08-01 12:37:47 +0200 )edit

Quoting @erAck: "...on a Text formatted cell I'd consider as bug."
Me too.
But my actual reason to avoid the "@" wherever possible, and in specific sometimes in a case as described in the current question is that it not is a 'Numbers' format code, but a directive for the process of recognition after editing which is messy anyway. On the other hand the actual needs in case of a campaign to resolve that mess are too manifold to be addressed by an enhancement request.
Please also note my "If you want to use the cell next time for a formula ... you will need to change the setting again...".

Lupp gravatar imageLupp ( 2019-08-01 13:18:10 +0200 )edit

answered 2017-11-08 21:38:58 +0200

LebSteve gravatar image

Thanks. I tried both the "@" approach (it took me a bit to figure out where I would enter this, in the Format/Cells/Numbers menu) and the ="=" approach. They both did what I wanted to do. It's too bad that the method is not more obvious to find without having to ask a forum! I was used to using a preceding apostrophe per Excel.

edit flag offensive delete link more


The prefixed apostrophe works for numbers. In this case it isn't mirrored in the .String property of the cell and also not in the .Formula property, but only displayed during edit. In case of a formula preceded by the apostrophe that's different. Not changed in LibO since V3.3 (the very first version).
Buggy insofar is the behaviour of cells formatted to @.

Lupp gravatar imageLupp ( 2017-11-08 21:56:50 +0200 )edit

Since it sounds like Lupp's answer was correct, please click on the ✔ for that question.

Jim K gravatar imageJim K ( 2017-11-09 02:17:34 +0200 )edit

Correction to my previous comment:
Replace "and also not in the .Formula property, but only"
with "but in the .Formula property and also in the .FormulaLocal property, and thus"

Lupp gravatar imageLupp ( 2017-11-09 09:48:37 +0200 )edit

Question Tools

1 follower


Asked: 2017-11-07 15:05:32 +0200

Seen: 3,741 times

Last updated: Jul 28 '19