RetroFed Forum
Your home away from modern life.
How do you get the first "0" in "050" to show in a cell?
Post Reply
AuthorMessage
Flagstaff programming.dev Flagstaff@programming.dev
Joined: 2025-02-18
(edited) Quote

Even "Number Format: General" still omits the starting 0. I can't even get it to show up if I lead with a space or a "-." What is the trick? This is super-annoying.

18   Original
death_to_carrots feddit.org death_to_carrots@feddit.org
Joined: 2024-06-22
#2 · Quote Reply

Start with a »'«. Or configure the cell to not be a number, but a string.

8
OhNoMoreLemmy lemmy.ml OhNoMoreLemmy@lemmy.ml
Joined: 2023-06-04
#3 · (edited) Quote Reply

There's two options, one is to turn it into a string as discussed.

The other is:

Format a cell with a number format such as \0000. This format can be assigned in the Format code field under the Format - Cells - Numbers tab, and defines the cell display as "always put a zero first and then the integer, having at least three places, and filled with zeros at the left if less than three digits".

https://help.libreoffice.org/latest/en-US/text/scalc/guide/integer_leading_zero.html

14
Bev's Dad lemmy.ca BevsDad@lemmy.ca
Joined: 2025-03-06
#4 · Quote Reply

Start with a »'«. Or configure the cell to not be a number, but a string.

Yeah, 050 is a string not a number programing wise.

2
Dookieman12 piefed.social Dookieman12@piefed.social
Joined: 2026-07-01
#5 · Quote Reply

Change the number format to 'Text'.

General will attempt to apply the correct format based on cell contents. The numbers are making it implicitly apply the 'Number' format to the cell.

5
n4sdaq lemmy.dbzer0.com n4sdaq@lemmy.dbzer0.com
Joined: 2024-06-13
#6 · (edited) Quote Reply

Did you try putting a ' at the start of the cell?

3
HubertManne piefed.social HubertManne@piefed.social
Joined: 2025-03-13
#7 · Quote Reply

people already explained the options but just want to mention I just do the string thing. The only time I come across the need is for id type numbers and usually am not going to do any math on it. in that case i makes sense to treat it as a string.

1
Zier fedia.io Zier@fedia.io
Joined: 2023-06-17
#8 · Quote Reply

Format Cells / Numbers (tab)
Category (choose Number) / Format (is General) / Options (Leading Zeros 1)

Do not format numbers as 'Text' if you need to use them in formulas of finance like sums.

4
Flagstaff programming.dev Flagstaff@programming.dev
Joined: 2025-02-18
#9 · Quote Reply

Did you try putting a ' at the start of the cell?

Thanks, I do know about that but I want to avoid using an escape char because I want to be able to copy the cell without hidden characters entering the clipboard.

2
Flagstaff programming.dev Flagstaff@programming.dev
Joined: 2025-02-18
#10 · Quote Reply

people already explained the options but just want to mention I just do the string thing. The only time I come across the need is for id type numbers and usually am not going to do any math on it. in that case i makes sense to treat it as a string.

Right, same; this is part of an ID and is needed. I'm not at a computer right now to check but I'll look for it some more, thanks to the other commentators' guidance here (I had posted here because I couldn't find it)...

1
Post Reply
Back to top