Hey guys, im looking for a vba to merge the current cell with all the blank cells below it. I'm automating a report, which turns into a pivot table, and then i need that pivot table in text format for something else. I was thinking of doing something like this and merge cells while recording.
but this also selects the next line with text. the data looks kind of like
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Shah, karan[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Jones, Dave[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Soni, Anand[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Thomas, Melissa[/TD]
[/TR]
[TR]
[TD]Davis, Nathaniel[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Kent, Michael[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lee, Sabrina[/TD]
[TD]Patel, Shruti[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Charles, Brent[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I want it so it merges with the cells below, the data is like a sideways tree i guess?
Code:
Range("A91").Select
Range(Selection, Selection.End(xlDown)).Select
but this also selects the next line with text. the data looks kind of like
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Shah, karan[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Jones, Dave[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Soni, Anand[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Thomas, Melissa[/TD]
[/TR]
[TR]
[TD]Davis, Nathaniel[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Kent, Michael[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Lee, Sabrina[/TD]
[TD]Patel, Shruti[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Charles, Brent[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I want it so it merges with the cells below, the data is like a sideways tree i guess?