Sorting Alphanumeric Values in multiple columns

data808

Active Member
Joined
Dec 3, 2010
Messages
358
Office Version
  1. 2019
Platform
  1. Windows
Hi, I'm having issues sorting values that will have dashes, numbers, and letters in multiple merged columns. Ultimately what I would like is a button that I can create some VBA behind it or something that will sort this data when I click on it. Another option is if it can just sort the values on the fly as I type them into the cells. Examples of the values will look like this:

1ABC-10-455781
1ABI-11-322411
1ABP-10-769112

Below is an example of how it looks on the spreadsheet. The merged cells for that first value (1ABC-19-509451) is from columns B-H starting on row 10. The cell next to "26" in the next column over is merged from J-P. The last column on the far right starting from number "51", the cell next to it is merged from R-X. Each of those numbers from 1-75 is each a cell. It has nothing to do with the values other than keeping a record number for it. Of course those numbers do not need to be sorted and those cells will be locked from the user to edit. I will entering values in all 3 columns in sequence but most times will only use 1 or 2 columns because I will run out of values to enter for the day. I would like the values to be sorted in some kind of order if possible. Thank you so much for taking the time to help with this dilemma.

[TABLE="width: 633"]
<tbody>[TR]
[TD]1[/TD]
[TD="colspan: 7"]1ABC-19-509451[/TD]
[TD]26[/TD]
[TD="colspan: 7"][/TD]
[TD]51[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="colspan: 7"]1ABI-19-509602[/TD]
[TD]27[/TD]
[TD="colspan: 7"][/TD]
[TD]52[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="colspan: 7"]1ABC-19-509901[/TD]
[TD]28[/TD]
[TD="colspan: 7"][/TD]
[TD]53[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD="colspan: 7"]1ABI-19-510103[/TD]
[TD]29[/TD]
[TD="colspan: 7"][/TD]
[TD]54[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD="colspan: 7"]1ABC-19-510203[/TD]
[TD]30[/TD]
[TD="colspan: 7"][/TD]
[TD]55[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD="colspan: 7"]1ABI-19-510412[/TD]
[TD]31[/TD]
[TD="colspan: 7"][/TD]
[TD]56[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD="colspan: 7"][/TD]
[TD]32[/TD]
[TD="colspan: 7"][/TD]
[TD]57[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD="colspan: 7"][/TD]
[TD]33[/TD]
[TD="colspan: 7"][/TD]
[TD]58[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD="colspan: 7"][/TD]
[TD]34[/TD]
[TD="colspan: 7"][/TD]
[TD]59[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD="colspan: 7"][/TD]
[TD]35[/TD]
[TD="colspan: 7"][/TD]
[TD]60[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD="colspan: 7"][/TD]
[TD]36[/TD]
[TD="colspan: 7"][/TD]
[TD]61[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD="colspan: 7"][/TD]
[TD]37[/TD]
[TD="colspan: 7"][/TD]
[TD]62[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD="colspan: 7"][/TD]
[TD]38[/TD]
[TD="colspan: 7"][/TD]
[TD]63[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD="colspan: 7"][/TD]
[TD]39[/TD]
[TD="colspan: 7"][/TD]
[TD]64[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD="colspan: 7"][/TD]
[TD]40[/TD]
[TD="colspan: 7"][/TD]
[TD]65[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD="colspan: 7"][/TD]
[TD]41[/TD]
[TD="colspan: 7"][/TD]
[TD]66[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD="colspan: 7"][/TD]
[TD]42[/TD]
[TD="colspan: 7"][/TD]
[TD]67[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD="colspan: 7"][/TD]
[TD]43[/TD]
[TD="colspan: 7"][/TD]
[TD]68[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD="colspan: 7"][/TD]
[TD]44[/TD]
[TD="colspan: 7"][/TD]
[TD]69[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD="colspan: 7"][/TD]
[TD]45[/TD]
[TD="colspan: 7"][/TD]
[TD]70[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD="colspan: 7"][/TD]
[TD]46[/TD]
[TD="colspan: 7"][/TD]
[TD]71[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD="colspan: 7"][/TD]
[TD]47[/TD]
[TD="colspan: 7"][/TD]
[TD]72[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]23[/TD]
[TD="colspan: 7"][/TD]
[TD]48[/TD]
[TD="colspan: 7"][/TD]
[TD]73[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]24[/TD]
[TD="colspan: 7"][/TD]
[TD]49[/TD]
[TD="colspan: 7"][/TD]
[TD]74[/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD="colspan: 7"][/TD]
[TD]50[/TD]
[TD="colspan: 7"][/TD]
[TD]75[/TD]
[TD="colspan: 7"][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Not sure why the columns are so uneven shown in my post above, but just FYI, on the spreadsheet they are equally spaced out. Thanks.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,992
Messages
6,175,822
Members
452,672
Latest member
missbanana

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