V
Vince48
How do I combine and sort a column of zip codes that has data in both 5-digit
and 9-digit formats?
and 9-digit formats?
-0000 > with nothing > Replace all
[email protected] said: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
[email protected] said:How do I combine and sort a column of zip codes that has data in both 5-digit
and 9-digit formats?
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
:
How do I combine and sort a column of zip codes that has data in both 5-digit
and 9-digit formats?
CLR said:I don't understand Vince..........I just tried it again with some leading
zero Zips and it worked fine on my Excel 2000..........what version are you
using?...............are you sure you Copy > PasteSpecial > Values to get
rid of the formulas before sorting the HKelper column?
Vaya con Dios,
Chuck, CABGx3
[email protected] said: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
[email protected] said:How do I combine and sort a column of zip codes that has data in both 5-digit
and 9-digit formats?
Chuck,
I'm using Excel 2003. The problem appears to be that although the Zip Code
in theoretical column A appears as a 5-digit number in Cell A1, in the
formula bar it shows up as a just a four digit number, i.e. the Zip Code
02446 shows up as 2446 in the formula bar.
Debra,
Thanks for responding. I also tried your solution and excel told me I had an
error in the formula.
Thanks for your help.
Vince
:
I don't understand Vince..........I just tried it again with some leading
zero Zips and it worked fine on my Excel 2000..........what version are you
using?...............are you sure you Copy > PasteSpecial > Values to get
rid of the formulas before sorting the HKelper column?
Vaya con Dios,
Chuck, CABGx3
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
:
How do I combine and sort a column of zip codes that has data in both
5-digit
and 9-digit formats?
Debra Dalgleish said:You could use: =IF(LEN(A2)>5,TEXT(A2,"00000-0000"),TEXT(A2,"00000"))
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
:
How do I combine and sort a column of zip codes that has data in both 5-digit
and 9-digit formats?
Debra Dalgleish said:You could use: =IF(LEN(A2)>5,TEXT(A2,"00000-0000"),TEXT(A2,"00000"))
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
:
How do I combine and sort a column of zip codes that has data in both 5-digit
and 9-digit formats?
Debra,
One more thing: can you explain the logic of the solution?
:
You could use: =IF(LEN(A2)>5,TEXT(A2,"00000-0000"),TEXT(A2,"00000"))
[email protected] said: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
:
How do I combine and sort a column of zip codes that has data in both 5-digit
and 9-digit formats?
[email protected] said:Chuck,
I'm using Excel 2003. The problem appears to be that although the Zip Code
in theoretical column A appears as a 5-digit number in Cell A1, in the
formula bar it shows up as a just a four digit number, i.e. the Zip Code
02446 shows up as 2446 in the formula bar.
Debra,
Thanks for responding. I also tried your solution and excel told me I had an
error in the formula.
Thanks for your help.
Vince
CLR said:I don't understand Vince..........I just tried it again with some leading
zero Zips and it worked fine on my Excel 2000..........what version are you
using?...............are you sure you Copy > PasteSpecial > Values to get
rid of the formulas before sorting the HKelper column?
Vaya con Dios,
Chuck, CABGx3
message news:[email protected]...logicalChuck,
Thanks for your reply. Close, but no cigar yet! If you apply the
test"Zip +[=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
4",sortyou still can't get the initial zero to appear. When you then try to
thebothworksheet by that column, the initial zero Zips don't come up first.
Vince
:
How do I combine and sort a column of zip codes that has data in
5-digitand 9-digit formats?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.