Hey guys, So i have a pivot table, and i need to copy it to another page to run calculations on it and what not. when i copy it over, there are a lot of blank cells under the cells with content, since it was merged in a pivot table. I'm trying to create a macro which would automatically fill the empty cells below it with the cell value above it. How would I go about doing that?
here's an example table
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]some name[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Name2[/TD]
[/TR]
[TR]
[TD]some other name[/TD]
[TD]name 3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]name 4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
here's how what I'm trying to get.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Some Name[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD]Some Name[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD]Some Name[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD]Some Name[/TD]
[TD]name 2[/TD]
[/TR]
[TR]
[TD]Some Other Name[/TD]
[TD]name 3[/TD]
[/TR]
[TR]
[TD]Some Other Name[/TD]
[TD]name 3[/TD]
[/TR]
[TR]
[TD]Some Other Name[/TD]
[TD]name 4[/TD]
[/TR]
[TR]
[TD]Some Other Name[/TD]
[TD]name 4[/TD]
[/TR]
</tbody>[/TABLE]
here's an example table
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]some name[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Name2[/TD]
[/TR]
[TR]
[TD]some other name[/TD]
[TD]name 3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]name 4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
here's how what I'm trying to get.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Some Name[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD]Some Name[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD]Some Name[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD]Some Name[/TD]
[TD]name 2[/TD]
[/TR]
[TR]
[TD]Some Other Name[/TD]
[TD]name 3[/TD]
[/TR]
[TR]
[TD]Some Other Name[/TD]
[TD]name 3[/TD]
[/TR]
[TR]
[TD]Some Other Name[/TD]
[TD]name 4[/TD]
[/TR]
[TR]
[TD]Some Other Name[/TD]
[TD]name 4[/TD]
[/TR]
</tbody>[/TABLE]
Last edited: