Open Office 3.3 Spreadsheet: Adding a Leading Zero

xunil2003 Posted messages 766 Registration date   Status Member Last intervention   -  
pépé35530 Posted messages 2951 Registration date   Status Member Last intervention   -
Hello,

I am using OpenOffice 3.3 Calc (Spreadsheet), but I need to put a zero in front of the first digit, and when I do so and save it, the zero doesn't stay.
Example 0795236

How can I use a leading zero in OpenOffice Calc?

Thank you in advance, best regards.
Configuration: Windows 7 / Internet Explorer 9.0

4 answers

aquarelle Posted messages 7181 Registration date   Status Moderator Last intervention   1 311
 
Good evening,

You need to create a special format for your cell. Click on the menu "Format" and then on "Cells..."
In the window that opens, under Category, choose "User Defined". Then enter [$0]0 in the field located below "Format Description". Then click on the green checkmark that appears after this field (which allows you to add this new format to the existing formats in the list). Then click on "OK"

There you have created a format, and you can reuse it whenever you need it for other cells.

Have a good evening

--
"To find a solution to one's problems, one must make an effort."
7
pépé35530 Posted messages 2951 Registration date   Status Member Last intervention   1 390
 
Hello,
if you don't need to do calculations with your numbers, you can give them a text format. The zeros you type will display.
You can go through the menu defining the formats or type an apostrophe before entering the digits.

Best,
pépé
4
Raymond PENTIER Posted messages 58208 Registration date   Status Contributor Last intervention   17 478
 
Have you tried creating a custom number format:
0000000 ?
--
Retirement is great! Especially in the Antilles ... :-)
☻ Raymond ♂
2
xunil2003 Posted messages 766 Registration date   Status Member Last intervention   14
 
Good evening,

With "Format description" [$0]0.
The problem is that when I type a number it automatically adds a zero, which I don't always need.

What I actually need is to add a zero at the beginning when I need it?

With custom number format: 0000000?
it adds a lot of zeros, like 0000000795236

Thank you
0
Raymond PENTIER Posted messages 58208 Registration date   Status Contributor Last intervention   17 478
 
The ? is not part of the format!
0