Hi all,
Apologies for the long title, but I wanted to highlight that this is not just the typical 'sort one column based on another' question, but an extension of it.
I have data that is structured something like this:
[TABLE="width: 462"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD][/TD]
[TD]Column D[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Lorem ipsum dolor sit amet[/TD]
[TD][/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]consectetur adipiscing elit[/TD]
[TD][/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Nam posuere maximus tellus[/TD]
[TD][/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]efficitur convallis odio ullamcorper ac[/TD]
[TD][/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Sed ex erat[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]efficitur et metus eget[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]congue finibus ipsum[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Nunc pretium sit amet massa nec dictum[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Pellentesque id mauris imperdiet[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]porta est eget[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]imperdiet lacus[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]Proin nisl purus[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I would like to reorder Column A and Column B (Column B should reorder when Column A is reordered) based on the order in Column D.
The outcome should look something like this:
[TABLE="width: 345"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Lorem ipsum dolor sit amet[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Nam posuere maximus tellus[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]consectetur adipiscing elit[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]efficitur convallis odio ullamcorper ac[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Sed ex erat[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]efficitur et metus eget[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Nunc pretium sit amet massa nec dictum[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]congue finibus ipsum[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]porta est eget[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]imperdiet lacus[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Pellentesque id mauris imperdiet[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]Proin nisl purus[/TD]
[/TR]
</tbody>[/TABLE]
"=MATCH(A1,D:D,FALSE)" wouldn't work for me in this case because Columns A-B contain groups of data (denoted as separated by blank rows here) and I would like to keep the order within groups instead of having all the 'A's coming together, 'B's coming together, etc.
Just wondering if there's any way to achieve this.
Would greatly appreciate any help or advice at all. Thanks so much!
Apologies for the long title, but I wanted to highlight that this is not just the typical 'sort one column based on another' question, but an extension of it.
I have data that is structured something like this:
[TABLE="width: 462"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD][/TD]
[TD]Column D[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Lorem ipsum dolor sit amet[/TD]
[TD][/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]consectetur adipiscing elit[/TD]
[TD][/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Nam posuere maximus tellus[/TD]
[TD][/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]efficitur convallis odio ullamcorper ac[/TD]
[TD][/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Sed ex erat[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]efficitur et metus eget[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]congue finibus ipsum[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Nunc pretium sit amet massa nec dictum[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Pellentesque id mauris imperdiet[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]porta est eget[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]imperdiet lacus[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]Proin nisl purus[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I would like to reorder Column A and Column B (Column B should reorder when Column A is reordered) based on the order in Column D.
The outcome should look something like this:
[TABLE="width: 345"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Lorem ipsum dolor sit amet[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Nam posuere maximus tellus[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]consectetur adipiscing elit[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]efficitur convallis odio ullamcorper ac[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Sed ex erat[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]efficitur et metus eget[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Nunc pretium sit amet massa nec dictum[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]congue finibus ipsum[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]porta est eget[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]imperdiet lacus[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Pellentesque id mauris imperdiet[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]Proin nisl purus[/TD]
[/TR]
</tbody>[/TABLE]
"=MATCH(A1,D:D,FALSE)" wouldn't work for me in this case because Columns A-B contain groups of data (denoted as separated by blank rows here) and I would like to keep the order within groups instead of having all the 'A's coming together, 'B's coming together, etc.
Just wondering if there's any way to achieve this.
Would greatly appreciate any help or advice at all. Thanks so much!