Hi,
I have a set of data as shown below
[TABLE="width: 275"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Value[/TD]
[TD]Category[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]Red[/TD]
[TD] A[/TD]
[TD]3-Jun-19[/TD]
[/TR]
[TR]
[TD]Yellow[/TD]
[TD]B[/TD]
[TD]8-Aug-22[/TD]
[/TR]
[TR]
[TD]Blue [/TD]
[TD]C[/TD]
[TD]10-Jun-20[/TD]
[/TR]
[TR]
[TD]Green[/TD]
[TD]A[/TD]
[TD]12-Dec-19[/TD]
[/TR]
[TR]
[TD]Black[/TD]
[TD]B[/TD]
[TD]12-Dec-21[/TD]
[/TR]
[TR]
[TD]Purple[/TD]
[TD]C[/TD]
[TD]5-Jul-23[/TD]
[/TR]
[TR]
[TD]Pink[/TD]
[TD]A[/TD]
[TD]30-Dec-20[/TD]
[/TR]
[TR]
[TD]Brown[/TD]
[TD]A[/TD]
[TD]21-Nov-20[/TD]
[/TR]
[TR]
[TD]Magenta[/TD]
[TD]B[/TD]
[TD]5-Mar-19[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]A[/TD]
[TD]24-Jul-23[/TD]
[/TR]
[TR]
[TD]Lime[/TD]
[TD]A[/TD]
[TD]13-Feb-28
[/TD]
[/TR]
</tbody>[/TABLE]
I want to sort it this way
[TABLE="width: 964"]
<colgroup><col span="2"><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Enter Category[/TD]
[TD]<A>[/TD]
[TD="colspan: 2"]Before 2020[/TD]
[TD="colspan: 2"]Between 2020-2022[/TD]
[TD="colspan: 2"]After 2023[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Value[/TD]
[TD]Date[/TD]
[TD]Value[/TD]
[TD]Date[/TD]
[TD]Value[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Red[/TD]
[TD]3-Jun-19[/TD]
[TD]Brown[/TD]
[TD]21-Nov-20[/TD]
[TD]Orange[/TD]
[TD]24-Jul-23[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Green[/TD]
[TD]12-Dec-19[/TD]
[TD]Pink[/TD]
[TD]30-Dec-20[/TD]
[TD]Lime[/TD]
[TD]13-Feb-28[/TD]
[/TR]
</tbody>[/TABLE]
Any formulas to use for sorting this way. Please help.
Regards
I have a set of data as shown below
[TABLE="width: 275"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Value[/TD]
[TD]Category[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]Red[/TD]
[TD] A[/TD]
[TD]3-Jun-19[/TD]
[/TR]
[TR]
[TD]Yellow[/TD]
[TD]B[/TD]
[TD]8-Aug-22[/TD]
[/TR]
[TR]
[TD]Blue [/TD]
[TD]C[/TD]
[TD]10-Jun-20[/TD]
[/TR]
[TR]
[TD]Green[/TD]
[TD]A[/TD]
[TD]12-Dec-19[/TD]
[/TR]
[TR]
[TD]Black[/TD]
[TD]B[/TD]
[TD]12-Dec-21[/TD]
[/TR]
[TR]
[TD]Purple[/TD]
[TD]C[/TD]
[TD]5-Jul-23[/TD]
[/TR]
[TR]
[TD]Pink[/TD]
[TD]A[/TD]
[TD]30-Dec-20[/TD]
[/TR]
[TR]
[TD]Brown[/TD]
[TD]A[/TD]
[TD]21-Nov-20[/TD]
[/TR]
[TR]
[TD]Magenta[/TD]
[TD]B[/TD]
[TD]5-Mar-19[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]A[/TD]
[TD]24-Jul-23[/TD]
[/TR]
[TR]
[TD]Lime[/TD]
[TD]A[/TD]
[TD]13-Feb-28
[/TD]
[/TR]
</tbody>[/TABLE]
I want to sort it this way
[TABLE="width: 964"]
<colgroup><col span="2"><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Enter Category[/TD]
[TD]<A>[/TD]
[TD="colspan: 2"]Before 2020[/TD]
[TD="colspan: 2"]Between 2020-2022[/TD]
[TD="colspan: 2"]After 2023[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Value[/TD]
[TD]Date[/TD]
[TD]Value[/TD]
[TD]Date[/TD]
[TD]Value[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Red[/TD]
[TD]3-Jun-19[/TD]
[TD]Brown[/TD]
[TD]21-Nov-20[/TD]
[TD]Orange[/TD]
[TD]24-Jul-23[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Green[/TD]
[TD]12-Dec-19[/TD]
[TD]Pink[/TD]
[TD]30-Dec-20[/TD]
[TD]Lime[/TD]
[TD]13-Feb-28[/TD]
[/TR]
</tbody>[/TABLE]
Any formulas to use for sorting this way. Please help.
Regards