#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default Postal codes

Most postal codes have 5 figures. When importing files from certain external
program becomes e.g. 05235 -- 5235 (without the 0 in the beginning). How to
insert 0 in front of the 5235. I have 10000 rowes and don't want to do it
manually....
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Postal codes

Format-cells-number-custom. Use "00000" (without quotes)

"Karin" wrote:

Most postal codes have 5 figures. When importing files from certain external
program becomes e.g. 05235 -- 5235 (without the 0 in the beginning). How to
insert 0 in front of the 5235. I have 10000 rowes and don't want to do it
manually....

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default Postal codes

Thank you Eric! Nice weekend!

"Eric" skrev:

Format-cells-number-custom. Use "00000" (without quotes)

"Karin" wrote:

Most postal codes have 5 figures. When importing files from certain external
program becomes e.g. 05235 -- 5235 (without the 0 in the beginning). How to
insert 0 in front of the 5235. I have 10000 rowes and don't want to do it
manually....

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Postal codes

No problem. But remember that doing this as a formatting change means the
value remains stored as 5235, and it only looks correct so long as you limit
its use to Excel.

If you want to do something with the data (i.e. create mailing labels in
Word though a mail merge), you'll need to actually convert the *value* to
05235. Otherwise your mailing labels will read "Anytown, US 5235"

One way to convert is to sort the spreadsheet by the zips. For those
appearing as four digits, insert a helper column and a formula next to them
to add the leading zero. If, for example, 5235 appears in A1, here's the
formula to put in B1:

="0"&A1

Copy the formula down through the four-digit range. Then copy the block and
paste-special-values over the original dataset and delete the helper.

Have a great weekend.

"Karin" wrote:

Thank you Eric! Nice weekend!

"Eric" skrev:

Format-cells-number-custom. Use "00000" (without quotes)

"Karin" wrote:

Most postal codes have 5 figures. When importing files from certain external
program becomes e.g. 05235 -- 5235 (without the 0 in the beginning). How to
insert 0 in front of the 5235. I have 10000 rowes and don't want to do it
manually....

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Postal codes

.... or merely use =TEXT(A1,"00000") throughout?
--
David Biddulph

"Eric" wrote in message
...
No problem. But remember that doing this as a formatting change means the
value remains stored as 5235, and it only looks correct so long as you
limit
its use to Excel.

If you want to do something with the data (i.e. create mailing labels in
Word though a mail merge), you'll need to actually convert the *value* to
05235. Otherwise your mailing labels will read "Anytown, US 5235"

One way to convert is to sort the spreadsheet by the zips. For those
appearing as four digits, insert a helper column and a formula next to
them
to add the leading zero. If, for example, 5235 appears in A1, here's the
formula to put in B1:

="0"&A1

Copy the formula down through the four-digit range. Then copy the block
and
paste-special-values over the original dataset and delete the helper.

Have a great weekend.

"Karin" wrote:

Thank you Eric! Nice weekend!

"Eric" skrev:

Format-cells-number-custom. Use "00000" (without quotes)

"Karin" wrote:

Most postal codes have 5 figures. When importing files from certain
external
program becomes e.g. 05235 -- 5235 (without the 0 in the beginning).
How to
insert 0 in front of the 5235. I have 10000 rowes and don't want to
do it
manually....



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
international postal codes JJ Johnson Excel Worksheet Functions 3 November 10th 07 03:23 PM
formula for Canadian postal codes LB Excel Worksheet Functions 7 July 18th 07 12:07 AM
formula for Canadian Postal Codes LB Excel Worksheet Functions 6 January 25th 07 06:30 PM
UK Postal codes in Excel Paul G Excel Worksheet Functions 6 October 30th 06 12:07 PM
Distances between Postal Codes Irfan Excel Discussion (Misc queries) 1 May 31st 06 10:49 PM


All times are GMT +1. The time now is 01:51 AM.

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"