if I insert the + symbol not as an operator it auto deletes it
like so
behavioyr that I do not want
if I insert the + symbol not as an operator it auto deletes it
like so
behavioyr that I do not want
Format the column as Text before you enter the +1
wishes are ignored by computers. You have to tell them.
.
In this case select format cells from context menu and your own formatting, wich always includes a + for positive numbers. This is actually a workaround, as your + is removed, while your input is converted from your keystrokes/letters to internal representation. But a new + can be shown when you look at the cell.
(and asbit is only formating it works also for filled cells.)
.
Attention: You have to set this formatting for any cells, where you need it. For all other areas the current “behaviour” will be kept.
.
You may also use text-formatting, but if you wish to calculate later, please remember: You told Calc to ignore the input is a number, so not everything may work as expected.
.
And at last: Formatting doesn’t change values. So you must set formatting before you write contents to them or formatting is silently ignored.
A nitpicking (that I consider important):
It is not “silently ignored”, which would be bad. It is correctly used, just the result may be not what one expects.
@
, it is “display it as if it was a text”, formatting the numeric data as decimal for display. It would make all dates, booleans, etc. to be displayed as simple decimal numbers. For formats like 0.000
, it would apply the present first numeric format part to numbers, and use the implied (missing) fourth part of the format string, which is, again, @
, for textual data.Again: my goal here is to stress that there’s no “silent ignoring”, which could be desirable to change, but there’s a correct use of some implied parts of the format string - and knowing about these rules is important.
Any old Excel tutorial from the 90ies tells you more about this. Since decades this is expected and wanted behaviour.
See the custom cell style “MyPlusMinusZero” in the attached sample file:
CellStyle_MyPlusMinusZero.ods (9.2 KB)
Use the CellStyle only. Do not try to format these cells manually (decimals or other). Modify the cell style if it is necessary.
(created in LO6.4.7.)
If the number shall remain a number, but show the plus in case of a positive value, you can order that with the help of a format string distinguishing positive and negative values. (There can also be defined alternatives for the zero value and for results or contents of type text.)
The very strange thing in this case is that the format code ignores the view of informed users, but follows a supposed expectation of the uninformed ones: You need to prefix the minus sign explicitly in the second position (for negative values) which otherwise would show an unsigned number (the absolute amount).
See also : Related help file
BTW: The so-called number-format-code “@” isn’t a format code at all, but a directive for the process interpreting newly entered/edited cell content. It means “Take it literally! Don’t try to ‘recogize’ a number/date or a formula”. Therefore you can’t use ‘@’ cells for calculations.
Hmm. And doesn’t this code in a string like foo @ bar
work like a proper code?
You’re kidding?
Well, my statement that @
is a “recognition directive” is highly simplified. In reality, it is more of an ingenious mess.
See
recognitionDirectiveOrFormatCode.ods (16.0 KB)
No; I actually meant to show that in my understanding, the @
is quite normal format code, making the data that it references appear in specific form, honoring other pieces of the format string. So given the format string that I mentioned above, a cell having content of abc
would display like foo abc bar
. And still, it is also clear that, like other format codes, this one can affect the newly entered cell content recognition (but that is not specific to this one: date, time, fractional, etc. cell format strings also affect that).
But I might misunderstand what you meant by “The so-called number-format-code “@” isn’t a format code at all”, especially when you write that “my statement that @
is a “recognition directive” is highly simplified”. So please excuse me if my remark confused the point that you made - I realize how unrelated comments may easily distract from the author’s point.