views:

232

answers:

2

I have list of STD Codes. If I paste a STD Code as 04562 , it automatically truncates the leading zero and store it as 4562. But I want it to to store it as 04562

Plz Give me a solution. Any Help will be highly appreciated

+2  A: 

If you are using MS Excel to edit the cells where you need to store the numbers with leading zero, just format and define the cell content as TEXT. If you are storing it programmatically, you can put the value in a quote '' for the same.

Kangkan
How to Set the format into text. Plz help im a beginner in excel
Rajasekar
I find it, thanks thanks very much
Rajasekar
You are most welcome!
Kangkan
You can also format as a zip code in the custom section of the number format dialogue.
guitarthrower
A: 

You can also just prefix your value with a ', though this flags the cell until you make it a text field.

Xorlev
That will work when entering the text manually. But when pasting, using Kangkan's solution will work.
guitarthrower