I have data in n number of rows and 2 columns.
I want to sort data in rows so that the matching values of 2 columns are aligned in the same row.
The Original data set and Required outcome below:
Original Data set
[TABLE="width: 230"]
<tbody>[TR]
[TD]Row[/TD]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]Apple2Red[/TD]
[TD]Apple1Red[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]Apple1Red[/TD]
[TD]Orange5Red[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]Apple1 Red[/TD]
[TD]Orange1Red[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]Apple1Yellow[/TD]
[TD]Apple1Yellow[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]Orange1Black[/TD]
[TD]Apple1Red[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]Orange1White[/TD]
[TD]Apple1Red[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]Orange5Red[/TD]
[TD]Orange1White[/TD]
[/TR]
</tbody>[/TABLE]
Required outcome
[TABLE="width: 211"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]Apple1 Red[/TD]
[TD]Apple1Red[/TD]
[/TR]
[TR]
[TD]Apple1Red[/TD]
[TD]Apple1Red[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Apple1Red[/TD]
[/TR]
[TR]
[TD]Apple1Yellow[/TD]
[TD]Apple1Yellow[/TD]
[/TR]
[TR]
[TD]Apple2Red[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Orange1Black[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Orange1White[/TD]
[TD]Orange1White[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Orange1Red[/TD]
[/TR]
[TR]
[TD]Orange5Red[/TD]
[TD]Orange5Red[/TD]
[/TR]
</tbody>[/TABLE]
I want to sort data in rows so that the matching values of 2 columns are aligned in the same row.
The Original data set and Required outcome below:
Original Data set
[TABLE="width: 230"]
<tbody>[TR]
[TD]Row[/TD]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]Apple2Red[/TD]
[TD]Apple1Red[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]Apple1Red[/TD]
[TD]Orange5Red[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]Apple1 Red[/TD]
[TD]Orange1Red[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]Apple1Yellow[/TD]
[TD]Apple1Yellow[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]Orange1Black[/TD]
[TD]Apple1Red[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]Orange1White[/TD]
[TD]Apple1Red[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]Orange5Red[/TD]
[TD]Orange1White[/TD]
[/TR]
</tbody>[/TABLE]
Required outcome
[TABLE="width: 211"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]Apple1 Red[/TD]
[TD]Apple1Red[/TD]
[/TR]
[TR]
[TD]Apple1Red[/TD]
[TD]Apple1Red[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Apple1Red[/TD]
[/TR]
[TR]
[TD]Apple1Yellow[/TD]
[TD]Apple1Yellow[/TD]
[/TR]
[TR]
[TD]Apple2Red[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Orange1Black[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Orange1White[/TD]
[TD]Orange1White[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Orange1Red[/TD]
[/TR]
[TR]
[TD]Orange5Red[/TD]
[TD]Orange5Red[/TD]
[/TR]
</tbody>[/TABLE]