|
|
You could use: =IF(LEN(A2)5,TEXT(A2,"00000-0000"),TEXT(A2,"00000"))
wrote:
Chuck,
Thanks for your reply. Close, but no cigar yet! If you apply the logical test
[=if(LEN(A1)=5, A1 & "-" & "0000"...], the helper cloumn drops the initial
zero in zip codes starting with "0", such as those here in Massachusetts.
Even if you later try to change the format of the helper column to "Zip + 4",
you still can't get the initial zero to appear. When you then try to sort the
worksheet by that column, the initial zero Zips don't come up first.
Vince
" wrote:
How do I combine and sort a column of zip codes that has data in both 5-digit
and 9-digit formats?
--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html
|