ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Keeping leading zeros in imported data (one digit month as 05) (https://www.excelbanter.com/excel-discussion-misc-queries/160119-keeping-leading-zeros-imported-data-one-digit-month-05-a.html)

exito816

Keeping leading zeros in imported data (one digit month as 05)
 
I am importing a csv into Excel. I need to retain leading zeros that occur
in a MMDD format. So that May 5th appears 0505 on csv but when imported it
appears 505. How can I do that easily?

Peo Sjoblom

Keeping leading zeros in imported data (one digit month as 05)
 
Rename the file to your_name.txt and the text import wizard will open, in
step 3 you can select text under column data, that will keep leading zeros.
You can also open the csv file doing dataimport external dataimport data
then in the file name type *.*, then find your csv file and open it, that
will also trigger the text import wizard


--


Regards,


Peo Sjoblom


"exito816" wrote in message
...
I am importing a csv into Excel. I need to retain leading zeros that occur
in a MMDD format. So that May 5th appears 0505 on csv but when imported
it
appears 505. How can I do that easily?




Dave Peterson

Keeping leading zeros in imported data (one digit month as 05)
 
You could format the cell after you bring in your data
(Format|cells|Number tab|Custom category: 0000)

Or you could rename your .csv file to .txt. Then when you do file|open, you'll
get the text import wizard and you can tell excel to treat this field as text.



exito816 wrote:

I am importing a csv into Excel. I need to retain leading zeros that occur
in a MMDD format. So that May 5th appears 0505 on csv but when imported it
appears 505. How can I do that easily?


--

Dave Peterson


All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com