Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format Column to display leading zeros.
Using an external program with a language very similar to VB I have a script
that uses CreateObject to create a new workbook and fill with data. All well and good. I have one column that is filled mostly with numbers where I need to see any leading zeros. How would I format this column before filling it? Changing the format after the data is entered results in missing leading zeros. With xl ..ActiveSheet.Columns("F:F").NumberFormat = ? Regards, Glenn |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format Column to display leading zeros.
On Mar 22, 1:15*pm, Glenn Buchanan <Glenn
wrote: Using an external program with a language very similar to VB I have a script that uses CreateObject to create a new workbook and fill with data. All well and good. I have one column that is filled mostly with numbers where I need to see any leading zeros. How would I format this column before filling it? Changing the format after the data is entered results in missing leading zeros. With xl .ActiveSheet.Columns("F:F").NumberFormat = ? Regards, Glenn The ZipCode format alows leading 0's Example: With xl .ActiveSheet.Columns("F:F").NumberFormat = "0000" |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format Column to display leading zeros.
Look he
http://support.microsoft.com/kb/81518 "Glenn Buchanan" wrote: Using an external program with a language very similar to VB I have a script that uses CreateObject to create a new workbook and fill with data. All well and good. I have one column that is filled mostly with numbers where I need to see any leading zeros. How would I format this column before filling it? Changing the format after the data is entered results in missing leading zeros. With xl .ActiveSheet.Columns("F:F").NumberFormat = ? Regards, Glenn |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format Column to display leading zeros.
as text -
rng.NumberFormat = "@" Regards, Peter T "Glenn Buchanan" <Glenn wrote in message ... Using an external program with a language very similar to VB I have a script that uses CreateObject to create a new workbook and fill with data. All well and good. I have one column that is filled mostly with numbers where I need to see any leading zeros. How would I format this column before filling it? Changing the format after the data is entered results in missing leading zeros. With xl .ActiveSheet.Columns("F:F").NumberFormat = ? Regards, Glenn |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format Column to display leading zeros.
Thanks to all who replied to my post.
After experimenting I found Peter's suggestion worked the best for my variable length data. Thanks again. Glenn. "Peter T" wrote: as text - rng.NumberFormat = "@" Regards, Peter T "Glenn Buchanan" <Glenn wrote in message ... Using an external program with a language very similar to VB I have a script that uses CreateObject to create a new workbook and fill with data. All well and good. I have one column that is filled mostly with numbers where I need to see any leading zeros. How would I format this column before filling it? Changing the format after the data is entered results in missing leading zeros. With xl .ActiveSheet.Columns("F:F").NumberFormat = ? Regards, Glenn |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I display leading zeros? | Setting up and Configuration of Excel | |||
Display leading zeros in numeric value without converting to text | Excel Discussion (Misc queries) | |||
save text field w/ leading zeros in .csv format & not lose zeros? | Excel Discussion (Misc queries) | |||
Display Binary Leading Zeros | Excel Discussion (Misc queries) | |||
How do I display leading zeros so I can export a fixed in Excel? | Excel Discussion (Misc queries) |