I've been all over the different questions and answers and can't seem to find one that fits my situation.
I have a large list of data (sales orders) where we might get multiple sales orders for the same client. I'm trying to sort the overall list by date but then group all orders for the same client together so the newer orders are brought forward with the oldest sales order for that client. The key is we are working on clients with the oldest sales order first, so I don't simply want to sort by client and then date. I'm not sure how to get where I need to go. Any suggestions?
[TABLE="width: 797"]
<colgroup><col><col><col><col><col span="2"><col><col><col><col></colgroup><tbody>[TR]
[TD="colspan: 4"][TABLE="width: 813"]
<colgroup><col><col><col><col><col span="2"><col><col><col><col></colgroup><tbody>[TR]
[TD="colspan: 4"]Current output[/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 4"]Desired Output[/TD]
[/TR]
[TR]
[TD]Client Name[/TD]
[TD]Status[/TD]
[TD]Order Date[/TD]
[TD]Client #[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client Name[/TD]
[TD]Status[/TD]
[TD]Order Date[/TD]
[TD]Client #[/TD]
[/TR]
[TR]
[TD]client 12[/TD]
[TD]Active[/TD]
[TD]5/17/2018[/TD]
[TD]1620858[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 12[/TD]
[TD]Active[/TD]
[TD]5/17/2018[/TD]
[TD]1620858[/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD]Active[/TD]
[TD]6/1/2018[/TD]
[TD]1628914[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 12[/TD]
[TD]Active[/TD]
[TD]6/23/2018[/TD]
[TD]1620858[/TD]
[/TR]
[TR]
[TD]client 10[/TD]
[TD]Hold[/TD]
[TD]6/5/2018[/TD]
[TD]1630746[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 1[/TD]
[TD]Active[/TD]
[TD]6/1/2018[/TD]
[TD]1628914[/TD]
[/TR]
[TR]
[TD]client 4[/TD]
[TD]Hold[/TD]
[TD]6/5/2018[/TD]
[TD]1630546[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 1[/TD]
[TD]Active[/TD]
[TD]6/23/2018[/TD]
[TD]1628914[/TD]
[/TR]
[TR]
[TD]client 9[/TD]
[TD]Hold[/TD]
[TD]6/5/2018[/TD]
[TD]1630410[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 10[/TD]
[TD]Hold[/TD]
[TD]6/5/2018[/TD]
[TD]1630746[/TD]
[/TR]
[TR]
[TD]client 7[/TD]
[TD]Active[/TD]
[TD]6/7/2018[/TD]
[TD]1479678[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 10[/TD]
[TD]Hold[/TD]
[TD]6/23/2018[/TD]
[TD]1630746[/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD]Hold[/TD]
[TD]6/11/2018[/TD]
[TD]1634284[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 4[/TD]
[TD]Hold[/TD]
[TD]6/5/2018[/TD]
[TD]1630546[/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD]Active[/TD]
[TD]6/23/2018[/TD]
[TD]1628914[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 4[/TD]
[TD]Hold[/TD]
[TD]6/23/2018[/TD]
[TD]1630546[/TD]
[/TR]
[TR]
[TD]client 10[/TD]
[TD]Hold[/TD]
[TD]6/23/2018[/TD]
[TD]1630746[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 9[/TD]
[TD]Hold[/TD]
[TD]6/5/2018[/TD]
[TD]1630410[/TD]
[/TR]
[TR]
[TD]client 11[/TD]
[TD]Rolled[/TD]
[TD]6/23/2018[/TD]
[TD]0128596[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 7[/TD]
[TD]Active[/TD]
[TD]6/7/2018[/TD]
[TD]1479678[/TD]
[/TR]
[TR]
[TD]client 12[/TD]
[TD]Active[/TD]
[TD]6/23/2018[/TD]
[TD]1620858[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 2[/TD]
[TD]Hold[/TD]
[TD]6/11/2018[/TD]
[TD]1634284[/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD]Hold[/TD]
[TD]6/23/2018[/TD]
[TD]1634284[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 2[/TD]
[TD]Hold[/TD]
[TD]6/23/2018[/TD]
[TD]1634284[/TD]
[/TR]
[TR]
[TD]client 4[/TD]
[TD]Hold[/TD]
[TD]6/23/2018[/TD]
[TD]1630546[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 11[/TD]
[TD]Rolled[/TD]
[TD]6/23/2018[/TD]
[TD]0128596[/TD]
[/TR]
[TR]
[TD]client 8[/TD]
[TD]Active[/TD]
[TD]6/23/2018[/TD]
[TD]0632193[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 8[/TD]
[TD]Active[/TD]
[TD]6/23/2018[/TD]
[TD]0632193[/TD]
[/TR]
[TR]
[TD]client 3[/TD]
[TD]Active[/TD]
[TD]8/2/2018[/TD]
[TD]1639915[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 3[/TD]
[TD]Active[/TD]
[TD]8/2/2018[/TD]
[TD]1639915[/TD]
[/TR]
[TR]
[TD]client 5[/TD]
[TD]Active[/TD]
[TD]8/8/2018[/TD]
[TD]1623580[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 3[/TD]
[TD]Active[/TD]
[TD]9/5/2018[/TD]
[TD]1639915[/TD]
[/TR]
[TR]
[TD]client 3[/TD]
[TD]Active[/TD]
[TD]9/5/2018[/TD]
[TD]1639915[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 5[/TD]
[TD]Active[/TD]
[TD]8/8/2018[/TD]
[TD]1623580[/TD]
[/TR]
[TR]
[TD]client 6[/TD]
[TD]Active[/TD]
[TD]9/7/2018[/TD]
[TD]1589648[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 6[/TD]
[TD]Active[/TD]
[TD]9/7/2018[/TD]
[TD]1589648[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 4"][/TD]
[/TR]
</tbody>[/TABLE]
I have a large list of data (sales orders) where we might get multiple sales orders for the same client. I'm trying to sort the overall list by date but then group all orders for the same client together so the newer orders are brought forward with the oldest sales order for that client. The key is we are working on clients with the oldest sales order first, so I don't simply want to sort by client and then date. I'm not sure how to get where I need to go. Any suggestions?
[TABLE="width: 797"]
<colgroup><col><col><col><col><col span="2"><col><col><col><col></colgroup><tbody>[TR]
[TD="colspan: 4"][TABLE="width: 813"]
<colgroup><col><col><col><col><col span="2"><col><col><col><col></colgroup><tbody>[TR]
[TD="colspan: 4"]Current output[/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 4"]Desired Output[/TD]
[/TR]
[TR]
[TD]Client Name[/TD]
[TD]Status[/TD]
[TD]Order Date[/TD]
[TD]Client #[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client Name[/TD]
[TD]Status[/TD]
[TD]Order Date[/TD]
[TD]Client #[/TD]
[/TR]
[TR]
[TD]client 12[/TD]
[TD]Active[/TD]
[TD]5/17/2018[/TD]
[TD]1620858[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 12[/TD]
[TD]Active[/TD]
[TD]5/17/2018[/TD]
[TD]1620858[/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD]Active[/TD]
[TD]6/1/2018[/TD]
[TD]1628914[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 12[/TD]
[TD]Active[/TD]
[TD]6/23/2018[/TD]
[TD]1620858[/TD]
[/TR]
[TR]
[TD]client 10[/TD]
[TD]Hold[/TD]
[TD]6/5/2018[/TD]
[TD]1630746[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 1[/TD]
[TD]Active[/TD]
[TD]6/1/2018[/TD]
[TD]1628914[/TD]
[/TR]
[TR]
[TD]client 4[/TD]
[TD]Hold[/TD]
[TD]6/5/2018[/TD]
[TD]1630546[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 1[/TD]
[TD]Active[/TD]
[TD]6/23/2018[/TD]
[TD]1628914[/TD]
[/TR]
[TR]
[TD]client 9[/TD]
[TD]Hold[/TD]
[TD]6/5/2018[/TD]
[TD]1630410[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 10[/TD]
[TD]Hold[/TD]
[TD]6/5/2018[/TD]
[TD]1630746[/TD]
[/TR]
[TR]
[TD]client 7[/TD]
[TD]Active[/TD]
[TD]6/7/2018[/TD]
[TD]1479678[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 10[/TD]
[TD]Hold[/TD]
[TD]6/23/2018[/TD]
[TD]1630746[/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD]Hold[/TD]
[TD]6/11/2018[/TD]
[TD]1634284[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 4[/TD]
[TD]Hold[/TD]
[TD]6/5/2018[/TD]
[TD]1630546[/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD]Active[/TD]
[TD]6/23/2018[/TD]
[TD]1628914[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 4[/TD]
[TD]Hold[/TD]
[TD]6/23/2018[/TD]
[TD]1630546[/TD]
[/TR]
[TR]
[TD]client 10[/TD]
[TD]Hold[/TD]
[TD]6/23/2018[/TD]
[TD]1630746[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 9[/TD]
[TD]Hold[/TD]
[TD]6/5/2018[/TD]
[TD]1630410[/TD]
[/TR]
[TR]
[TD]client 11[/TD]
[TD]Rolled[/TD]
[TD]6/23/2018[/TD]
[TD]0128596[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 7[/TD]
[TD]Active[/TD]
[TD]6/7/2018[/TD]
[TD]1479678[/TD]
[/TR]
[TR]
[TD]client 12[/TD]
[TD]Active[/TD]
[TD]6/23/2018[/TD]
[TD]1620858[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 2[/TD]
[TD]Hold[/TD]
[TD]6/11/2018[/TD]
[TD]1634284[/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD]Hold[/TD]
[TD]6/23/2018[/TD]
[TD]1634284[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client 2[/TD]
[TD]Hold[/TD]
[TD]6/23/2018[/TD]
[TD]1634284[/TD]
[/TR]
[TR]
[TD]client 4[/TD]
[TD]Hold[/TD]
[TD]6/23/2018[/TD]
[TD]1630546[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 11[/TD]
[TD]Rolled[/TD]
[TD]6/23/2018[/TD]
[TD]0128596[/TD]
[/TR]
[TR]
[TD]client 8[/TD]
[TD]Active[/TD]
[TD]6/23/2018[/TD]
[TD]0632193[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 8[/TD]
[TD]Active[/TD]
[TD]6/23/2018[/TD]
[TD]0632193[/TD]
[/TR]
[TR]
[TD]client 3[/TD]
[TD]Active[/TD]
[TD]8/2/2018[/TD]
[TD]1639915[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 3[/TD]
[TD]Active[/TD]
[TD]8/2/2018[/TD]
[TD]1639915[/TD]
[/TR]
[TR]
[TD]client 5[/TD]
[TD]Active[/TD]
[TD]8/8/2018[/TD]
[TD]1623580[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 3[/TD]
[TD]Active[/TD]
[TD]9/5/2018[/TD]
[TD]1639915[/TD]
[/TR]
[TR]
[TD]client 3[/TD]
[TD]Active[/TD]
[TD]9/5/2018[/TD]
[TD]1639915[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 5[/TD]
[TD]Active[/TD]
[TD]8/8/2018[/TD]
[TD]1623580[/TD]
[/TR]
[TR]
[TD]client 6[/TD]
[TD]Active[/TD]
[TD]9/7/2018[/TD]
[TD]1589648[/TD]
[TD][/TD]
[TD][/TD]
[TD]client 6[/TD]
[TD]Active[/TD]
[TD]9/7/2018[/TD]
[TD]1589648[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 4"][/TD]
[/TR]
</tbody>[/TABLE]