I have a list of travel details where each row is a different leg of a travelers journey. There are common details at the beginning of the row, such as passenger name and such. In order to use the data to auto-fill a templated itinerary I need to align the legs of the journeys per passenger into a single row. Here's an example of what the data I receive looks like...
[TABLE="class: grid, width: 800"]
<colgroup><col width="145" style="width: 109pt;"><col width="80" style="width: 60pt;"><col width="115" span="5" style="width: 86pt;"></colgroup><tbody>[TR]
[TD="width: 145"]DOE/JOHN[/TD]
[TD="width: 80, align: right"]1[/TD]
[TD="width: 115, align: right"]19/01/17[/TD]
[TD="width: 115, align: right"]19/01/17[/TD]
[TD="width: 115"]Duluth, MN[/TD]
[TD="width: 115"]Minneapolis, MN[/TD]
[TD="width: 115"]7:00AM[/TD]
[/TR]
[TR]
[TD]DOE/JOHN[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]19/01/17[/TD]
[TD="align: right"]19/01/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Kansas City, MO[/TD]
[TD]9:55AM[/TD]
[/TR]
[TR]
[TD]DOE/JOHN[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]25/01/17[/TD]
[TD="align: right"]25/01/17[/TD]
[TD]Kansas City, MO[/TD]
[TD]Minneapolis, MN[/TD]
[TD]7:49PM[/TD]
[/TR]
[TR]
[TD]DOE/JOHN[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]25/01/17[/TD]
[TD="align: right"]25/01/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Duluth, MN[/TD]
[TD]10:00PM[/TD]
[/TR]
[TR]
[TD]PICKLE/FARMER[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]31/07/17[/TD]
[TD="align: right"]31/07/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Kansas City, MO[/TD]
[TD]7:05AM[/TD]
[/TR]
[TR]
[TD]PICKLE/FARMER[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2/08/17[/TD]
[TD="align: right"]2/08/17[/TD]
[TD]Kansas City, MO[/TD]
[TD]Minneapolis, MN[/TD]
[TD]7:49PM[/TD]
[/TR]
[TR]
[TD]SMITH/MRS.[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]31/03/17[/TD]
[TD="align: right"]31/03/17[/TD]
[TD]Madison, WI[/TD]
[TD]Minneapolis, MN[/TD]
[TD]6:40AM[/TD]
[/TR]
[TR]
[TD]SMITH/MRS.[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]31/03/17[/TD]
[TD="align: right"]31/03/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Kansas City, MO[/TD]
[TD]9:55AM[/TD]
[/TR]
[TR]
[TD]SMITH/MRS.[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1/04/17[/TD]
[TD="align: right"]1/04/17[/TD]
[TD]Kansas City, MO[/TD]
[TD]Minneapolis, MN[/TD]
[TD]7:49PM[/TD]
[/TR]
[TR]
[TD]SMITH/MRS.[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1/04/17[/TD]
[TD="align: right"]1/04/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Madison, WI[/TD]
[TD]10:20PM[/TD]
[/TR]
</tbody>[/TABLE]
Ideally what I would have would look like this...
[TABLE="class: grid, width: 2366"]
<colgroup><col width="168" style="width:126pt"> <col width="20" style="width:15pt"> <col width="85" style="width:64pt" span="2"> <col width="149" style="width:112pt"> <col width="152" style="width:114pt"> <col width="75" style="width:56pt"> <col width="20" style="width:15pt"> <col width="85" style="width:64pt" span="2"> <col width="152" style="width:114pt" span="2"> <col width="75" style="width:56pt"> <col width="20" style="width:15pt"> <col width="74" style="width:56pt" span="2"> <col width="152" style="width:114pt"> <col width="149" style="width:112pt"> <col width="75" style="width:56pt"> <col width="20" style="width:15pt"> <col width="74" style="width:56pt" span="2"> <col width="149" style="width:112pt"> <col width="116" style="width:87pt"> <col width="86" style="width:65pt"> </colgroup><tbody>[TR]
[TD="width: 168"]DOE/JOHN[/TD]
[TD="width: 20, align: right"]1[/TD]
[TD="width: 85, align: right"]6/08/17[/TD]
[TD="width: 85, align: right"]6/08/17[/TD]
[TD="width: 149"]Duluth, MN[/TD]
[TD="width: 152"]Minneapolis, MN[/TD]
[TD="width: 75"]7:00AM[/TD]
[TD="width: 20, align: right"]2[/TD]
[TD="width: 85, align: right"]6/08/17[/TD]
[TD="width: 85, align: right"]6/08/17[/TD]
[TD="width: 152"]Minneapolis, MN[/TD]
[TD="width: 152"]Kansas City, MO[/TD]
[TD="width: 75"]9:55AM[/TD]
[TD="width: 20, align: right"]3[/TD]
[TD="width: 74, align: right"]7/08/17[/TD]
[TD="width: 74, align: right"]7/08/17[/TD]
[TD="width: 152"]Kansas City, MO[/TD]
[TD="width: 149"]Minneapolis, MN[/TD]
[TD="width: 75"]7:49PM[/TD]
[TD="width: 20, align: right"]4[/TD]
[TD="width: 74, align: right"]7/08/17[/TD]
[TD="width: 74, align: right"]7/08/17[/TD]
[TD="width: 149"]Minneapolis, MN[/TD]
[TD="width: 116"]Duluth, MN[/TD]
[TD="width: 86"]10:00PM[/TD]
[/TR]
[TR]
[TD]PICKLE/FARMER[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]31/07/17[/TD]
[TD="align: right"]31/07/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Kansas City, MO[/TD]
[TD]7:05AM[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2/08/17[/TD]
[TD="align: right"]2/08/17[/TD]
[TD]Kansas City, MO[/TD]
[TD]Minneapolis, MN[/TD]
[TD]7:49PM[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SMITH/MRS.[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]31/07/17[/TD]
[TD="align: right"]31/07/17[/TD]
[TD]Madison, WI[/TD]
[TD]Minneapolis, MN[/TD]
[TD]6:40AM[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]31/07/17[/TD]
[TD="align: right"]31/07/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Kansas City, MO[/TD]
[TD]9:55AM[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1/08/17[/TD]
[TD="align: right"]1/08/17[/TD]
[TD]Kansas City, MO[/TD]
[TD]Minneapolis, MN[/TD]
[TD]7:49PM[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1/08/17[/TD]
[TD="align: right"]1/08/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Madison, WI[/TD]
[TD]10:20PM[/TD]
[/TR]
</tbody>[/TABLE]
I was thinking something along the lines of IF name field matches cell above cut cells 8 thru 13 of current row, offset up 1 row, find first empty cell to the right, then paste. IF does not match cell above, drop to cell in col A and repeat. Loop thru each row until end.
If you have anything idea of how to accomplish this, I'm good with that, but this was what my mind conceived.
Any help would be appreciated!
[TABLE="class: grid, width: 800"]
<colgroup><col width="145" style="width: 109pt;"><col width="80" style="width: 60pt;"><col width="115" span="5" style="width: 86pt;"></colgroup><tbody>[TR]
[TD="width: 145"]DOE/JOHN[/TD]
[TD="width: 80, align: right"]1[/TD]
[TD="width: 115, align: right"]19/01/17[/TD]
[TD="width: 115, align: right"]19/01/17[/TD]
[TD="width: 115"]Duluth, MN[/TD]
[TD="width: 115"]Minneapolis, MN[/TD]
[TD="width: 115"]7:00AM[/TD]
[/TR]
[TR]
[TD]DOE/JOHN[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]19/01/17[/TD]
[TD="align: right"]19/01/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Kansas City, MO[/TD]
[TD]9:55AM[/TD]
[/TR]
[TR]
[TD]DOE/JOHN[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]25/01/17[/TD]
[TD="align: right"]25/01/17[/TD]
[TD]Kansas City, MO[/TD]
[TD]Minneapolis, MN[/TD]
[TD]7:49PM[/TD]
[/TR]
[TR]
[TD]DOE/JOHN[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]25/01/17[/TD]
[TD="align: right"]25/01/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Duluth, MN[/TD]
[TD]10:00PM[/TD]
[/TR]
[TR]
[TD]PICKLE/FARMER[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]31/07/17[/TD]
[TD="align: right"]31/07/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Kansas City, MO[/TD]
[TD]7:05AM[/TD]
[/TR]
[TR]
[TD]PICKLE/FARMER[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2/08/17[/TD]
[TD="align: right"]2/08/17[/TD]
[TD]Kansas City, MO[/TD]
[TD]Minneapolis, MN[/TD]
[TD]7:49PM[/TD]
[/TR]
[TR]
[TD]SMITH/MRS.[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]31/03/17[/TD]
[TD="align: right"]31/03/17[/TD]
[TD]Madison, WI[/TD]
[TD]Minneapolis, MN[/TD]
[TD]6:40AM[/TD]
[/TR]
[TR]
[TD]SMITH/MRS.[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]31/03/17[/TD]
[TD="align: right"]31/03/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Kansas City, MO[/TD]
[TD]9:55AM[/TD]
[/TR]
[TR]
[TD]SMITH/MRS.[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1/04/17[/TD]
[TD="align: right"]1/04/17[/TD]
[TD]Kansas City, MO[/TD]
[TD]Minneapolis, MN[/TD]
[TD]7:49PM[/TD]
[/TR]
[TR]
[TD]SMITH/MRS.[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1/04/17[/TD]
[TD="align: right"]1/04/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Madison, WI[/TD]
[TD]10:20PM[/TD]
[/TR]
</tbody>[/TABLE]
Ideally what I would have would look like this...
[TABLE="class: grid, width: 2366"]
<colgroup><col width="168" style="width:126pt"> <col width="20" style="width:15pt"> <col width="85" style="width:64pt" span="2"> <col width="149" style="width:112pt"> <col width="152" style="width:114pt"> <col width="75" style="width:56pt"> <col width="20" style="width:15pt"> <col width="85" style="width:64pt" span="2"> <col width="152" style="width:114pt" span="2"> <col width="75" style="width:56pt"> <col width="20" style="width:15pt"> <col width="74" style="width:56pt" span="2"> <col width="152" style="width:114pt"> <col width="149" style="width:112pt"> <col width="75" style="width:56pt"> <col width="20" style="width:15pt"> <col width="74" style="width:56pt" span="2"> <col width="149" style="width:112pt"> <col width="116" style="width:87pt"> <col width="86" style="width:65pt"> </colgroup><tbody>[TR]
[TD="width: 168"]DOE/JOHN[/TD]
[TD="width: 20, align: right"]1[/TD]
[TD="width: 85, align: right"]6/08/17[/TD]
[TD="width: 85, align: right"]6/08/17[/TD]
[TD="width: 149"]Duluth, MN[/TD]
[TD="width: 152"]Minneapolis, MN[/TD]
[TD="width: 75"]7:00AM[/TD]
[TD="width: 20, align: right"]2[/TD]
[TD="width: 85, align: right"]6/08/17[/TD]
[TD="width: 85, align: right"]6/08/17[/TD]
[TD="width: 152"]Minneapolis, MN[/TD]
[TD="width: 152"]Kansas City, MO[/TD]
[TD="width: 75"]9:55AM[/TD]
[TD="width: 20, align: right"]3[/TD]
[TD="width: 74, align: right"]7/08/17[/TD]
[TD="width: 74, align: right"]7/08/17[/TD]
[TD="width: 152"]Kansas City, MO[/TD]
[TD="width: 149"]Minneapolis, MN[/TD]
[TD="width: 75"]7:49PM[/TD]
[TD="width: 20, align: right"]4[/TD]
[TD="width: 74, align: right"]7/08/17[/TD]
[TD="width: 74, align: right"]7/08/17[/TD]
[TD="width: 149"]Minneapolis, MN[/TD]
[TD="width: 116"]Duluth, MN[/TD]
[TD="width: 86"]10:00PM[/TD]
[/TR]
[TR]
[TD]PICKLE/FARMER[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]31/07/17[/TD]
[TD="align: right"]31/07/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Kansas City, MO[/TD]
[TD]7:05AM[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2/08/17[/TD]
[TD="align: right"]2/08/17[/TD]
[TD]Kansas City, MO[/TD]
[TD]Minneapolis, MN[/TD]
[TD]7:49PM[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SMITH/MRS.[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]31/07/17[/TD]
[TD="align: right"]31/07/17[/TD]
[TD]Madison, WI[/TD]
[TD]Minneapolis, MN[/TD]
[TD]6:40AM[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]31/07/17[/TD]
[TD="align: right"]31/07/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Kansas City, MO[/TD]
[TD]9:55AM[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1/08/17[/TD]
[TD="align: right"]1/08/17[/TD]
[TD]Kansas City, MO[/TD]
[TD]Minneapolis, MN[/TD]
[TD]7:49PM[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1/08/17[/TD]
[TD="align: right"]1/08/17[/TD]
[TD]Minneapolis, MN[/TD]
[TD]Madison, WI[/TD]
[TD]10:20PM[/TD]
[/TR]
</tbody>[/TABLE]
I was thinking something along the lines of IF name field matches cell above cut cells 8 thru 13 of current row, offset up 1 row, find first empty cell to the right, then paste. IF does not match cell above, drop to cell in col A and repeat. Loop thru each row until end.
If you have anything idea of how to accomplish this, I'm good with that, but this was what my mind conceived.
Any help would be appreciated!