Sort 8 position alphanumeric correctly

hawgmech

New Member
Joined
Apr 28, 2020
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I have an excel list in which column A contains an alphanumeric value that can be between 6-8 position long. The 5th position will be a letter (J or P). all other position is a number (0-9). An example would be 3410P10 or 9413J101. My issue is that when I go to sort, they are not sorting according to numerical value after the letter.

For example, I have:

2730J1
2730J10
2730J2

I would like the be able to select the sort button or the custom sort and sort this correctly so that it looks like this:

2730J1
2730J2
2730J10

I'm a novice when it comes to excel, but I'm creating this listing for other people in the office to use that can add additional numbers and will require to sort.

Is there a way to "correct" the sort without the need to add additional columns or break the values up into its sub components?

Thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
try pasting this into cell b2
=RIGHT(A2,LEN(A2)-5)

this should sort correctly for you
 
Upvote 0
You could keep them all the same length by adding leading zeroes and then sort.

2730J01
2730J02
2730J10
 
Upvote 0
to get all sort items in three digit form use the following update

=TEXT(RIGHT(A2,LEN(A2)-5),"000")
 
Upvote 0

Forum statistics

Threads
1,214,821
Messages
6,121,759
Members
449,048
Latest member
excelknuckles

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