Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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.

3 Answers 3

up vote 13 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 the Format>Numbers>Plain Text will keep leading zeros.

share|improve this answer
1  
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

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:

=IF(LEN(MONTH(TODAY()))=1;CONCATENATE(0,MONTH(TODAY()));MONTH(TODAY()))
share|improve this answer

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

'050

and it will be interpreted as the string 050.

Another option is to write it as a formula:

="050"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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