Quick question on MS Excel custom sort filter

Mears

Platinum Member
Mar 9, 2000
2,095
1
81
I have a list of zip codes, some of which have the 4 digit extension and some that don't. There are two different zip code types listed under special, but neither of them work. The 5 digit only, sorts as follows:

38123
49436
90210
49436-1234 - Notice this is out of place

The extension one adds extra numbers to the ones missing the extensions.

Any idea on how to get around this?
 

NeoV

Diamond Member
Apr 18, 2000
9,504
2
81
yes, in a column right next to that one, use the function LEFT to give you a 5 digit ONLY value for each zip code, and sort by that column..

=left(a1,5)

is what the command would look like...assuming your zip codes start in cell A1 - just copy that formula down for all the zip codes you have, then sort
 

bunker

Lifer
Apr 23, 2001
10,572
0
71
Originally posted by: yamahaXS
break apart the zip so that you have the 5 digits in 1 column and the 4 digits in another.

That would be my suggestion as well.