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. [TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]A1 Unique ID[/TD]
[TD]B Date[/TD]
[TD]C Type[/TD]
[TD]D Front[/TD]
[TD]E Right[/TD]
[TD]F Left[/TD]
[TD]G Back[/TD]
[TD]H Time[/TD]
[/TR]
[TR]
[TD]2 1001[/TD]
[TD]1/1[/TD]
[TD]A[/TD]
[TD]23[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]3 1002[/TD]
[TD]1/1[/TD]
[TD]A[/TD]
[TD]21[/TD]
[TD]0[/TD]
[TD]70[/TD]
[TD]0[/TD]
[TD]0.20[/TD]
[/TR]
[TR]
[TD]4 1003[/TD]
[TD]1/1[/TD]
[TD]B[/TD]
[TD]21[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]5 1004[/TD]
[TD]1/1[/TD]
[TD]C[/TD]
[TD]0[/TD]
[TD]23[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]6 1005[/TD]
[TD]1/1[/TD]
[TD]A[/TD]
[TD]70[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]7 1006[/TD]
[TD]1/2[/TD]
[TD]B[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]29[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]8 1007[/TD]
[TD]1/2[/TD]
[TD]A[/TD]
[TD]17[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
</tbody>[/TABLE]
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)
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]A1 Unique ID[/TD]
[TD]B Date[/TD]
[TD]C Type[/TD]
[TD]D Front[/TD]
[TD]E Right[/TD]
[TD]F Left[/TD]
[TD]G Back[/TD]
[TD]H Time[/TD]
[/TR]
[TR]
[TD]2 1001[/TD]
[TD]1/1[/TD]
[TD]A[/TD]
[TD]23[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]3 1004[/TD]
[TD]1/1[/TD]
[TD]C[/TD]
[TD]0[/TD]
[TD]23[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]4 1005[/TD]
[TD]1/1[/TD]
[TD]A[/TD]
[TD]70[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]5 1002[/TD]
[TD]1/1[/TD]
[TD]A[/TD]
[TD]21[/TD]
[TD]0[/TD]
[TD]70[/TD]
[TD]0[/TD]
[TD]0.20[/TD]
[/TR]
[TR]
[TD]6 1003[/TD]
[TD]1/1[/TD]
[TD]B[/TD]
[TD]21[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]7 1006[/TD]
[TD]1/2[/TD]
[TD]B[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]29[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]8 1007[/TD]
[TD]1/2[/TD]
[TD]A[/TD]
[TD]17[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10
[/TD]
[/TR]
</tbody>[/TABLE]
I understand this may be confusing, but any help is greatly appreciated! Thanks in advance!!!
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. [TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]A1 Unique ID[/TD]
[TD]B Date[/TD]
[TD]C Type[/TD]
[TD]D Front[/TD]
[TD]E Right[/TD]
[TD]F Left[/TD]
[TD]G Back[/TD]
[TD]H Time[/TD]
[/TR]
[TR]
[TD]2 1001[/TD]
[TD]1/1[/TD]
[TD]A[/TD]
[TD]23[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]3 1002[/TD]
[TD]1/1[/TD]
[TD]A[/TD]
[TD]21[/TD]
[TD]0[/TD]
[TD]70[/TD]
[TD]0[/TD]
[TD]0.20[/TD]
[/TR]
[TR]
[TD]4 1003[/TD]
[TD]1/1[/TD]
[TD]B[/TD]
[TD]21[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]5 1004[/TD]
[TD]1/1[/TD]
[TD]C[/TD]
[TD]0[/TD]
[TD]23[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]6 1005[/TD]
[TD]1/1[/TD]
[TD]A[/TD]
[TD]70[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]7 1006[/TD]
[TD]1/2[/TD]
[TD]B[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]29[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]8 1007[/TD]
[TD]1/2[/TD]
[TD]A[/TD]
[TD]17[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
</tbody>[/TABLE]
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)
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]A1 Unique ID[/TD]
[TD]B Date[/TD]
[TD]C Type[/TD]
[TD]D Front[/TD]
[TD]E Right[/TD]
[TD]F Left[/TD]
[TD]G Back[/TD]
[TD]H Time[/TD]
[/TR]
[TR]
[TD]2 1001[/TD]
[TD]1/1[/TD]
[TD]A[/TD]
[TD]23[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]3 1004[/TD]
[TD]1/1[/TD]
[TD]C[/TD]
[TD]0[/TD]
[TD]23[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]4 1005[/TD]
[TD]1/1[/TD]
[TD]A[/TD]
[TD]70[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]5 1002[/TD]
[TD]1/1[/TD]
[TD]A[/TD]
[TD]21[/TD]
[TD]0[/TD]
[TD]70[/TD]
[TD]0[/TD]
[TD]0.20[/TD]
[/TR]
[TR]
[TD]6 1003[/TD]
[TD]1/1[/TD]
[TD]B[/TD]
[TD]21[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]7 1006[/TD]
[TD]1/2[/TD]
[TD]B[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]29[/TD]
[TD]0.10[/TD]
[/TR]
[TR]
[TD]8 1007[/TD]
[TD]1/2[/TD]
[TD]A[/TD]
[TD]17[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.10
[/TD]
[/TR]
</tbody>[/TABLE]
I understand this may be confusing, but any help is greatly appreciated! Thanks in advance!!!