Thisisgeoff
New Member
- Joined
- Mar 5, 2019
- Messages
- 1
Hello, I'm looking for some help re-organizing some data and am hoping to use VBA to do it. The current macro gets us to this point, but now I'm stuck. What we want to do is change this:
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]A
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]a
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]b
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]c
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]d1
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]d2
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]d3
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]d4
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]e
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]f
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]g
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]a
[/TD]
[TD]y
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]b
[/TD]
[TD]y
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]c
[/TD]
[TD]y
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]d1
[/TD]
[TD]y
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]e
[/TD]
[TD]y
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]f
[/TD]
[TD]y
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]g
[/TD]
[TD]y
[/TD]
[/TR]
</tbody>[/TABLE]
To this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]a
[/TD]
[TD]b
[/TD]
[TD]c
[/TD]
[TD]e
[/TD]
[TD]f
[/TD]
[TD]g
[/TD]
[TD]d1
[/TD]
[TD]d2
[/TD]
[TD]d3
[/TD]
[TD]d4
[/TD]
[TD]d...
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]y
[/TD]
[TD]y
[/TD]
[TD]y
[/TD]
[TD]y
[/TD]
[TD]y
[/TD]
[TD]y
[/TD]
[TD]y
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[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]
</tbody>[/TABLE]
There are two caveats, both the number of capital letters and the number of "d" occurances are variable.
Thank you so much for the help!
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]A
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]a
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]b
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]c
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]d1
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]d2
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]d3
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]d4
[/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]e
[/TD]
[TD]x
[/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TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
There are two caveats, both the number of capital letters and the number of "d" occurances are variable.
Thank you so much for the help!