0
votes

I have a pivot table already set up in a worksheet(sheetA). On a separate worksheet (sheetB) I have data. I manually populate this pivot table on a daily basis (using pivottable wizard and dragging data range).

Is there a way using vba to select this pivot table on sheetA and then populate it with a range of data from the sheetB?

1
Can't you simply refresh the pivot table when new data arrives in sheetB? Even if the range changes on sheetB there are ways to make this painless: In Excel 2007 or higher, you can create a "Table" (formerly known as "List") on sheetB and base the PT on the Table. Or, in any version you can base the PT on the full column range of sheetB instead of a predefined rectangular region.andy holaday

1 Answers

0
votes

VBA can certainly do this task. But an easier way is to make your pivot table based on a named range. Just change the dimensions of the range and right click->Refresh Table will do the job for you.