Forum Discussion
B_KRANTHI_KUMAR
May 04, 2021Copper Contributor
Sorting a Number with dash
Hi,
Please help me how to sort a number with dash.
example
201-1 |
201-10 |
201-11 |
201-12 |
201-13 |
201-14 |
201-2 |
201-3 |
201-4 |
201-5 |
201-6 |
201-7 |
201-8 |
201-9 |
Let's say the data start in A1.
Make sure that columns B and C are empty (insert columns if necessary).
Select the data.
On the Data tab of the ribbon, in the Data Tools Group, click Text to Columns.
Select Delimited, then click Next >.
Tick the check box for Other, and enter a dash (hyphen) in the box next to it.
Click Next >.
Enter or select B1 in the Destination box (to avoid overwriting the data.
Click Finish.
Select cell A1, or the entire range.
In the Sort & Filter group of the Data tab of the ribbon, click Sort (not the Sort A to Z or Sort Z to A buttons).
Select Column B in the Sort By dropdown, then add a new level and select Column C.
Click Sort.
If you wish, you can now clear columns B and C.
10 Replies
Sort By
Let's say the data start in A1.
Make sure that columns B and C are empty (insert columns if necessary).
Select the data.
On the Data tab of the ribbon, in the Data Tools Group, click Text to Columns.
Select Delimited, then click Next >.
Tick the check box for Other, and enter a dash (hyphen) in the box next to it.
Click Next >.
Enter or select B1 in the Destination box (to avoid overwriting the data.
Click Finish.
Select cell A1, or the entire range.
In the Sort & Filter group of the Data tab of the ribbon, click Sort (not the Sort A to Z or Sort Z to A buttons).
Select Column B in the Sort By dropdown, then add a new level and select Column C.
Click Sort.
If you wish, you can now clear columns B and C.
- johndzambaCopper Contributor
I am looking for an easier way to do this with a spreadsheet that will be added to continually, our part number listing.
sample part numbers:
1973-1
2433
3505-101
3505-101M077
I was hoping for a custom format but do not see an existing one and have been unable to create one out that works.
Thanks,
John
- peiyezhuBronze Contributorcould you show your raw data and expected result?
I am not sure what exactly would you like to do?
- B_KRANTHI_KUMARCopper ContributorProblem Solved.
Thank you so much.