How to sort alphanumeric text after dash starting with number then letter

jonathan92591

Board Regular
Joined
Oct 27, 2011
Messages
65
--
Excel or Access version:Excel 2013
Computer operating system:Windows 7
Sample data:Sheet1

*ABCD
1C1C2C3C4
2ABCABCB07-11B7
3ABCABCB07-1010B7
4ABCABCB07-10A10AB7
5ABCABCB07-10B10BB7
6ABCABCB07-1111B7
7ABCABCB07-11A11AB7
8ABCABCB07-22B7
9ABCABCB07-2A2AB7
10ABCABCB07-2B2BB7
11ABCABCB07-2C2CB7
12ABCABCB07-33B7
13ABCABCB07-3A3AB7
14ABCABCB07-3B3BB7
15ABCABCB07-44B7
16ABCABCB07-4A4AB7
17ABCABCB07-4B4BB7
18ABCABCB07-55B7
19ABCABCB07-66B7
20ABCABCB07-6A6AB7
21ABCABCB07-77B7
22ABCABCB07-7A7AB7
23ABCABCB07-7B7BB7
24ABCABCB07-7C7CB7
25ABCABCB07-88B7
26ABCABCB07-99B7
27ABCABCB07-9A9AB7
28ABCABCB07-9B9BB7

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:79px;"><col style="width:30px;"><col style="width:180px;"></colgroup><tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
Formula(s) right now:Not applicable, only using the sort function.
Current result(s):I sort column B lowest to highest.
My goal:To get the data to sort starting with after the "-" and going in order of number first then letter.
What I want it to look like:Sheet1

*ABCD
1C1C2C3C4
2ABCABCB07-11B7
3ABCABCB07-22B7
4ABCABCB07-2A2AB7
5ABCABCB07-2B2BB7
6ABCABCB07-2C2CB7
7ABCABCB07-33B7
8ABCABCB07-3A3AB7
9ABCABCB07-3B3BB7
10ABCABCB07-44B7
11ABCABCB07-4A4AB7
12ABCABCB07-4B4BB7
13ABCABCB07-55B7
14ABCABCB07-66B7
15ABCABCB07-6A6AB7
16ABCABCB07-77B7
17ABCABCB07-7A7AB7
18ABCABCB07-7B7BB7
19ABCABCB07-7C7CB7
20ABCABCB07-88B7
21ABCABCB07-99B7
22ABCABCB07-9A9AB7
23ABCABCB07-9B9BB7
24ABCABCB07-1010B7
25ABCABCB07-10A10AB7
26ABCABCB07-10B10BB7
27ABCABCB07-1111B7
28ABCABCB07-11A11AB7

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:79px;"><col style="width:30px;"><col style="width:180px;"></colgroup><tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
Error message:No error message
How error occurred:No error message
Generated in:Excel
Thank you.
JT

<tbody>
</tbody>
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
this solution with helper columns E & F (sort E > smallest to largest and F > A to Z);

Excel 2012
ABCDEF
1C1C2C3C4
2ABCABCB07-11B71
3ABCABCB07-22B72
4ABCABCB07-2A2AB72A
5ABCABCB07-2B2BB72B
6ABCABCB07-2C2CB72C
7ABCABCB07-33B73
8ABCABCB07-3A3AB73A
9ABCABCB07-3B3BB73B
10ABCABCB07-44B74
11ABCABCB07-4A4AB74A
12ABCABCB07-4B4BB74B
13ABCABCB07-55B75
14ABCABCB07-66B76
15ABCABCB07-6A6AB76A
16ABCABCB07-77B77
17ABCABCB07-7A7AB77A
18ABCABCB07-7B7BB77B
19ABCABCB07-7C7CB77C
20ABCABCB07-88B78
21ABCABCB07-99B79
22ABCABCB07-9A9AB79A
23ABCABCB07-9B9BB79B
24ABCABCB07-1010B710
25ABCABCB07-10A10AB710A
26ABCABCB07-10B10BB710B
27ABCABCB07-1111B711
28ABCABCB07-11A11AB711A

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet3
Worksheet Formulas
CellFormula
E2=IF(ISTEXT(C2),VALUE(LEFT(C2,LEN(C2)-1)),C2)
F2=IF(ISTEXT(C2),RIGHT(C2,1),"")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,659
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top