![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: John G
Posts: 62
|
I am trying to parse a text file that has a date field for the expiration of a cc. My dilemna is that I don't know how to take a number say for instance 01 and preserve it's leading zero. How can I format a number that insures that is xx # of digits even if it has to put zeros leading. Thanks for all of your help.
John |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Goto :
-format --custom --- type = 00
__________________
<MARQUEE>...........Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic...............The easiest thing to find is fault, don't be easy !.. --Anonymous--...</marquee> |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Hellas
Posts: 553
|
hello
try format ->custom ->00 for 2 digits or 000 for 3 digits i.e. if you have number 4 it will show 04 or if you have number 15 it will show 015
__________________
Best Regards Andreas
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Guderup, Denmark
Posts: 287
|
When you do the parsing, set the field as a textfield.
This way you will keep all leading zero's. regards Tommy |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
When you do the parsing format the column as a date... and forget about leading zeroes!
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Location: Guderup, Denmark
Posts: 287
|
Yes, Mark W
You're right. I read Date as Data regards tommy |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|