Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default FormatZipCode

=TRIM(G2)&", "&H2&", "&I2&", "&K2 & text(L2,"00000-0000")

if L2 contained the 9 digit zip (stored as a number).

Maybe this would be better:

=TRIM(G2)&", "&H2&", "&I2&", "&K2 &TEXT(L2,"[<100000]00000;00000-0000")

It'll handle 5 and 9 digit zipcodes.



jb wrote:

I have a cell with the Zip Code format set to add the - if it is a 9
digit code. I am copying the Street Address, City, State and Zip to
another column in the spreadsheet using the following:
=TRIM(G2)&", "&H2&", "&I2&", "&K2. Everything copies over except the -
in the zip code. What would be the correct formula to get the -
inserted in the zipcode?

Thanks


--

Dave Peterson

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



All times are GMT +1. The time now is 02:29 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"