Combining various rows with data above depending on criteria

Johnno1980

New Member
Joined
Jul 27, 2011
Messages
4
Hi All,

I currently have a macro running which is used to create tracks with always changing points. The start points I have managed to multiply by the amount I need but I am having trouble adding the end points because their number of times varies each run depending on how many end points there are. Below I have added what I have to begin with and what the output needs to be. I hope you are able to help and huge thank you in advance.

ORIGINAL TEXT INPUT:

[TABLE="width: 447"]
<colgroup><col></colgroup><tbody>[TR]
[TD]DC METRO DEPARTURES OVER TOPPS/EBONY PLEASE FILE:[/TD]
[/TR]
[TR]
[TD]SWANN..BROSS.J42.RBV..LLUND..BAYYS..PUT..DIRECT[/TD]
[/TR]
[TR]
[TD]SWANN..BROSS.J42.RBV..LLUND..BAYYS..PUT..DIRECT[/TD]
[/TR]
[TR]
[TD]DC METRO DEPARTURES OVER ALLEX PLEASE FILE:[/TD]
[/TR]
[TR]
[TD]SWANN..BROSS.J42.RBV..LLUND..BAYYS..PUT..WITCH..DIRECT[/TD]
[/TR]
[TR]
[TD]DC METRO DEPARTURES OVER BRADD/KANNI PLEASE FILE:[/TD]
[/TR]
[TR]
[TD]AGARD..SIE.J121.SHLEP..ACK..DIRECT[/TD]
[/TR]
[TR]
[TD]AGARD..SIE.J121.SHLEP..ACK..DIRECT[/TD]
[/TR]
[TR]
[TD]OR SWANN..BROSS.J42.RBV..ACK..DIRECT[/TD]
[/TR]
[TR]
[TD]OR SWANN..BROSS.J42.RBV..ACK..DIRECT[/TD]
[/TR]
[TR]
[TD]DC METRO DEPARTURES OVER WHALE PLEASE FILE:[/TD]
[/TR]
[TR]
[TD]AGARD..SIE.J121.SHLEP..YAHOO..DIRECT[/TD]
[/TR]
[TR]
[TD]OR SWANN..BROSS.J42.RBV..YAHOO..DIRECT[/TD]
[/TR]
[TR]
[TD]DC METRO DEPARTURES OVER DOVEY PLEASE FILE:[/TD]
[/TR]
[TR]
[TD]AGARD..SIE.B24.LYNUS..LARGE..DIRECT

REQUIRED TEXT OUTPUT:

[TABLE="width: 393"]
<colgroup><col></colgroup><tbody>[TR]
[TD]DC METRO DEPARTURES OVER TOPPS/EBONY PLEASE FILE:[/TD]
[/TR]
[TR]
[TD]SWANN..BROSS.J42.RBV..LLUND..BAYYS..PUT TOPPS[/TD]
[/TR]
[TR]
[TD]SWANN..BROSS.J42.RBV..LLUND..BAYYS..PUT EBONY[/TD]
[/TR]
[TR]
[TD]DC METRO DEPARTURES OVER ALLEX PLEASE FILE:[/TD]
[/TR]
[TR]
[TD]SWANN..BROSS.J42.RBV..LLUND..BAYYS..PUT..WITCH ALLEX[/TD]
[/TR]
[TR]
[TD]DC METRO DEPARTURES OVER BRADD/KANNI PLEASE FILE:[/TD]
[/TR]
[TR]
[TD]AGARD..SIE.J121.SHLEP..ACK BRADD[/TD]
[/TR]
[TR]
[TD]AGARD..SIE.J121.SHLEP..ACK KANNI[/TD]
[/TR]
[TR]
[TD]OR SWANN..BROSS.J42.RBV..ACK BRADD[/TD]
[/TR]
[TR]
[TD]OR SWANN..BROSS.J42.RBV..ACK KANNI[/TD]
[/TR]
[TR]
[TD]DC METRO DEPARTURES OVER WHALE PLEASE FILE:[/TD]
[/TR]
[TR]
[TD]AGARD..SIE.J121.SHLEP..YAHOO WHALE[/TD]
[/TR]
[TR]
[TD]OR SWANN..BROSS.J42.RBV..YAHOO WHALE[/TD]
[/TR]
[TR]
[TD]DC METRO DEPARTURES OVER DOVEY PLEASE FILE:[/TD]
[/TR]
[TR]
[TD]AGARD..SIE.B24.LYNUS..LARGE DOVEY

As you can see it is a bit messy. Well for my small brain!!! :)

Thanks all.
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top