Hello
I am trying to write a macro that joins strings of text together whilst also transposing. I'll try provide an example of what I'm after:
So here is table 1, where we write the campaign name, the ad group name and its associated keyword(s).
A B C D[TABLE="width: 676"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]Campaign Name:[/TD]
[TD]Campaign 1[/TD]
[TD]Campaign 2[/TD]
[TD]Campaign 3[/TD]
[/TR]
[TR]
[TD]Adgroup Name:[/TD]
[TD]Ad group 1[/TD]
[TD]Ad group 2[/TD]
[TD]Ad group 3[/TD]
[/TR]
[TR]
[TD]Keywords:[/TD]
[TD]Shoes[/TD]
[TD]dresses[/TD]
[TD]towels[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]blue shoes[/TD]
[TD]blue dresses[/TD]
[TD]blue towels[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]pink towels
red towels
[/TD]
[/TR]
[TR]
[TD]
What I want is a macro that will assign each keyword with its respective campaign name/ad group, per line, as shown:
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
A B C
[TABLE="width: 488"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Campaign Name[/TD]
[TD]Adgroup name[/TD]
[TD]Keyword[/TD]
[/TR]
[TR]
[TD]Campaign 1[/TD]
[TD]Ad group 1[/TD]
[TD]Shoes[/TD]
[/TR]
[TR]
[TD]Campaign 1[/TD]
[TD]Ad group 1[/TD]
[TD]blue shoes[/TD]
[/TR]
[TR]
[TD]Campaign 2[/TD]
[TD]Ad group 2[/TD]
[TD]dresses[/TD]
[/TR]
[TR]
[TD]Campaign 2[/TD]
[TD]Ad group 2[/TD]
[TD]blue dresses[/TD]
[/TR]
[TR]
[TD]Campaign 3[/TD]
[TD]Ad group 3[/TD]
[TD]towels[/TD]
[/TR]
[TR]
[TD]Campaign 3[/TD]
[TD]Ad group 3[/TD]
[TD]blue towels[/TD]
[/TR]
[TR]
[TD]Campaign 3[/TD]
[TD]Ad group 3[/TD]
[TD]pink towels[/TD]
[/TR]
[TR]
[TD]Campaign 3[/TD]
[TD]Ad group 3[/TD]
[TD]red towels[/TD]
[/TR]
</tbody>[/TABLE]
Thanks for your help!
I am trying to write a macro that joins strings of text together whilst also transposing. I'll try provide an example of what I'm after:
So here is table 1, where we write the campaign name, the ad group name and its associated keyword(s).
A B C D[TABLE="width: 676"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]Campaign Name:[/TD]
[TD]Campaign 1[/TD]
[TD]Campaign 2[/TD]
[TD]Campaign 3[/TD]
[/TR]
[TR]
[TD]Adgroup Name:[/TD]
[TD]Ad group 1[/TD]
[TD]Ad group 2[/TD]
[TD]Ad group 3[/TD]
[/TR]
[TR]
[TD]Keywords:[/TD]
[TD]Shoes[/TD]
[TD]dresses[/TD]
[TD]towels[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]blue shoes[/TD]
[TD]blue dresses[/TD]
[TD]blue towels[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]pink towels
red towels
[/TD]
[/TR]
[TR]
[TD]
What I want is a macro that will assign each keyword with its respective campaign name/ad group, per line, as shown:
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
A B C
[TABLE="width: 488"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Campaign Name[/TD]
[TD]Adgroup name[/TD]
[TD]Keyword[/TD]
[/TR]
[TR]
[TD]Campaign 1[/TD]
[TD]Ad group 1[/TD]
[TD]Shoes[/TD]
[/TR]
[TR]
[TD]Campaign 1[/TD]
[TD]Ad group 1[/TD]
[TD]blue shoes[/TD]
[/TR]
[TR]
[TD]Campaign 2[/TD]
[TD]Ad group 2[/TD]
[TD]dresses[/TD]
[/TR]
[TR]
[TD]Campaign 2[/TD]
[TD]Ad group 2[/TD]
[TD]blue dresses[/TD]
[/TR]
[TR]
[TD]Campaign 3[/TD]
[TD]Ad group 3[/TD]
[TD]towels[/TD]
[/TR]
[TR]
[TD]Campaign 3[/TD]
[TD]Ad group 3[/TD]
[TD]blue towels[/TD]
[/TR]
[TR]
[TD]Campaign 3[/TD]
[TD]Ad group 3[/TD]
[TD]pink towels[/TD]
[/TR]
[TR]
[TD]Campaign 3[/TD]
[TD]Ad group 3[/TD]
[TD]red towels[/TD]
[/TR]
</tbody>[/TABLE]
Thanks for your help!