How do you get the first "0" in "050" to show in a cell?

2 months ago by Flagstaff to c/libreoffice

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.

OhNoMoreLemmy 13 points 2 months ago

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/...

path: 0 25187917, hotness: undefined, score: 13, children: 0
death_to_carrots 8 points 2 months ago

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

path: 0 25187863, hotness: undefined, score: 8, children: 1
BevsDad 2 points 2 months ago

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

path: 0 25187863 25188924, hotness: undefined, score: 2, children: 0
Zier 4 points 2 months ago

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.

path: 0 25194029, hotness: undefined, score: 4, children: 0
Dookieman12 4 points 2 months ago

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.

path: 0 25189279, hotness: undefined, score: 4, children: 0
n4sdaq 2 points 2 months ago

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

path: 0 25190041, hotness: undefined, score: 2, children: 1
Flagstaff 2 points 2 months ago

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.

path: 0 25190041 25206468, hotness: undefined, score: 2, children: 0
HubertManne 1 point 2 months ago

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.

path: 0 25190775, hotness: undefined, score: 1, children: 1
Flagstaff 1 point 2 months ago

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)...

path: 0 25190775 25257752, hotness: undefined, score: 1, children: 0
libreoffice
libreoffice

@discuss.tchncs.de

login for more options
853
196
178

LibreOffice is a powerful free and open source office suite, used by millions around the world.

go to feed...