prorokrak
New member
- Joined
- Oct 24, 2018
- Messages
- 3
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- Excel 365 - always current
Hi,
recently I have discovered the powerful tool Power Query. There is a lot of learning to do but now I would need to do something that is out of my league. I would really appreciate if anyone could help me out with this.
I have three tables with identical indexes.
Problem is that each line of source text can contain different number of specific tags. Every occurrence of the tag should be replaced with the text from another column. That means that first <XXX> tag should be replaced with value from the first column in the XXX table, second tag should be replaced with the value from the second column and so on. The same applies for <YYY> tag and corresponding table.
The data are changing, so the maximum number of tags in the source text and respective number of columns in XXX-YYY tables can be higher than it is in the moment but I guess that there should never be more than ten tags/columns.
I have prepared an example file illustrating my data, including merging queries. Hopefully the file will be more understandable than my explanation here. See also "Wanted Result Example" sheet.
Here is also graphical illustration of what I want to achieve.

Thank you very much for your help in advance.
recently I have discovered the powerful tool Power Query. There is a lot of learning to do but now I would need to do something that is out of my league. I would really appreciate if anyone could help me out with this.
I have three tables with identical indexes.
- Source text that includes a text with specific tags - in my example file there are "<XXX>" and "<YYY>" tags.
- Two tables with text that should be inserted to the "Source text", replacing the tags.
Problem is that each line of source text can contain different number of specific tags. Every occurrence of the tag should be replaced with the text from another column. That means that first <XXX> tag should be replaced with value from the first column in the XXX table, second tag should be replaced with the value from the second column and so on. The same applies for <YYY> tag and corresponding table.
The data are changing, so the maximum number of tags in the source text and respective number of columns in XXX-YYY tables can be higher than it is in the moment but I guess that there should never be more than ten tags/columns.
I have prepared an example file illustrating my data, including merging queries. Hopefully the file will be more understandable than my explanation here. See also "Wanted Result Example" sheet.
Here is also graphical illustration of what I want to achieve.

Thank you very much for your help in advance.