Sorting Multiple Columns with duplicates

Erika7

New Member
Joined
Oct 14, 2013
Messages
3
I need to create a sorting method and/or macro to sort the entire table but with 4 of the columns (D-G below) being similarly sorted/grouped where values may be found in any (or all) of the 4. Please see the example below to get a better understanding of the situation. There are actually 31 columns, but I'm only showing 8 for example purposes. It should first sort by Date, then Location (Front, Right, Back, Left) based on Unique ID then the other hidden columns.

The part I'm getting stuck is sorting the Locations: I need it to be able to sort similar 'Unique IDs' based on the numbers found in the locations; however, the numbers can be found in any of the 4 locations and on any of the unique # rows.
A1 Unique IDB DateC TypeD FrontE RightF LeftG BackH Time
2 10011/1A230000.10
3 10021/1A2107000.20
4 10031/1B210000.10
5 10041/1C023000.10
6 10051/1A700000.10
7 10061/2B000290.10
8 10071/2A170000.10

<tbody>
</tbody>

See below for ideal answer. Note that the rows are sorted first by Date, then the Location IDs are sorted adjacently (it should know which line to sort next based on the Unique ID order - smallest ID always goes first)

A1 Unique IDB DateC TypeD FrontE RightF LeftG BackH Time
2 10011/1A230000.10
3 10041/1C023000.10
4 10051/1A700000.10
5 10021/1A2107000.20
6 10031/1B210000.10
7 10061/2B000290.10
8 10071/2A170000.10

<tbody>
</tbody>

I understand this may be confusing, but any help is greatly appreciated! Thanks in advance!!!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
It is a little confusing. What is the logic that 1005 (with Front = 70) comes before 1002 (with Front = 21 & Left = 70)?
 
Upvote 0
Sorry, you're correct. The final answer should have ID 1003 and 1005 flipped. Thank you for catching that.


It is a little confusing. What is the logic that 1005 (with Front = 70) comes before 1002 (with Front = 21 & Left = 70)?
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

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