简体   繁体   中英

Populating pivot table using VBA

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM