How to sort mixed zip codes (5 digits and 9 digits) ascending in Excel?
As we know, there are two types of zip codes, one is 5-digits series, and the other is the 9-digits series. In this case, there is a list mixed with these two types of zip codes, the job is to sort the zip codes by first five basic digits as below screenshot shown, how can you quickly handle it?
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
You can create a helper column and use a formula to extract the first five digits from the zip codes, then sort by this helper column.
1. Select a blank cell next to the zip codes, and then enter this formula =LEFT(C2,5), drag fill handle down to the cells you need. See screenshot:
2. Then all the first five zip codes have been extracted. Click Data tab, go to Sort & Filter group to select a sorting order you need, in the Sort Warning dialog, check Expand the selection. See screenshot:
3. Click Sort. Now the range have been sorted by the zip codes’ first five digits.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 1 years agoMuch simpler: select column. replace all '-' with '.'. sort. replace all '.' with '-'