Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a column in which all inputs are numbers. But these numbers are actually not real numbers. Not real in the sense, 050 in this case is very different from 50

The problem is that whenever I add 050 the sheet automatically turns it to 50. I have also tried ** 050**. That is, prepending a space to no avail. It still auto-corrects as 50.

What can I do to avoid this?

share|improve this question

migrated from superuser.com Nov 16 '12 at 8:33

This question came from our site for computer enthusiasts and power users.

up vote 24 down vote accepted

If there's a difference between 50 and 050, what you have are strings (i.e. text).

Changing the cell format to Plain Text via Format>Numbers>Plain Text will keep leading zeros.

share|improve this answer
was wondering why you did not post it as an answer :) – naveen Nov 16 '12 at 8:29
Yeah, I realised that posting as a comment would leave the question showing as 'unanswered' so best to do it properly :] – J20 Nov 16 '12 at 8:30

Since @jam 's answer there might be some improvement in Spreadsheet's features.

If you'd like to preserve and use the numbers as figures (e.g., automatic fill) you might apply the settings from the

Format > Number > More Formats > Custom number format...

menu, and set the pattern to 000, where the number of zeros represent the number of digits to which the completion will be made with the leading zeros.

share|improve this answer
Yes, this is in the "new" Google Spreadsheet. – w3dk Nov 20 '14 at 1:08

A quicker way of formatting a cell as text, is to add a preceding apostrophe to your number. In a cell, type


and it will be interpreted as the string 050.

Another option is to write it as a formula:

share|improve this answer
Does not work if it is a formula, as this will display the formula, not the result of the formula – davea0511 May 17 at 16:57
@davea0511 That is kind of the point - to display the text 050, not any interpretation of it. – Vidar S. Ramdal May 18 at 7:16

I needed to have a leading zero on the current month of the year for creating a custom date code I use on my invoices. This is what I did:

share|improve this answer

You can format the contents of the cell as Plain Text. Here are step-by-step instructions of how to format a number in a Google Sheet.

share|improve this answer
Why can't you put the instructions here in this answer? What happens when that link stops working? – Al E. Jan 20 '15 at 3:16
It has now stopped working. It looks like you need to select the cell(s), then go to Format -> Number -> Plain Text. – Ricky Clarkson Jun 22 at 18:00

protected by Community May 17 at 17:26

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.