Expand Excel PivotTable without overlaying another PivotTable (VBA)

Occasional Contributor

Hi guys, please help me. I need to expand my Excel pivot table without overwriting the other pivot table below. Is it possible to do this using VBA? Would anyone have the code? I need that when I click the button to expand the data, the other table below is "pushed" so that it doesn't overwrite. Currently, if I click the table button to expand or collapse, I will get an error saying "A pivot table cannot overwrite another pivot table". I need to fix this.

5 Replies
I need this to be automatic, do the opposite every time I expand the table I will have to move it manually.

@Rai__LS 

 

Pivot table expand going down and going right. so what part of the worksheet can you put something that will not get affected with the expansion, find that place.

Yah, i know that, is because of that i need do it using a VBA code. I´m looking for this code in the web.
you don't need VBA to find that place, that place is to the left of the location of the pivot table will not be affected by the expansion/contraction of the pivot table.