Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default formatting zip codes in excel

I am outputting data from a datalist in c# to an excel document. One of my
columns contains zip codes, some that are 9 digits, and some that are only 5.
If I use Number Format to format the zip codes like this:

"#####-####"

then the zip codes with only 5 digits show up like this, for example: 1-2345
instead of 12345-

Is there a way that I can tell it to format the number from the left, rather
than from the right?

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default formatting zip codes in excel

If the data are really numbers, try this custom format...

[99999]00000-0000;00000
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"elfenland"
wrote in message
I am outputting data from a datalist in c# to an excel document. One of my
columns contains zip codes, some that are 9 digits, and some that are only 5.
If I use Number Format to format the zip codes like this:
"#####-####"
then the zip codes with only 5 digits show up like this, for example: 1-2345
instead of 12345-
Is there a way that I can tell it to format the number from the left, rather
than from the right?
Thanks!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel and zip codes dm Excel Discussion (Misc queries) 10 September 12th 06 07:34 PM
Zip codes are not formatting Debbie Love Excel Discussion (Misc queries) 1 August 9th 05 06:39 PM
Zip Codes from excel to .csv vkushnerov New Users to Excel 3 February 10th 05 04:43 PM
Bar Codes in Excel bktopper Excel Discussion (Misc queries) 2 December 2nd 04 08:25 PM
Formatting Codes for header and footer chambers777 Excel Programming 2 January 6th 04 11:50 PM


All times are GMT +1. The time now is 09:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"