Pivot table - data source links to new workbook

gerald24

Board Regular
Joined
Apr 28, 2017
Messages
95
Hi,

Is it possible to make my pivot table links to its data source in a new workbook?

For example:

In Examplefile.xlsm
I have "Datasource" sheet and "Pivot" sheet.
But I need to make a copy of both sheets to a new workbook.
So I click the 2 sheets and create copy to a new workbook.

Apparently, the above would end up the Pivot Table in the new workbook linking to Examplefile.xlsm's Datasource sheet.


Thank you Captain!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Anyone know why the below returns an error (Invalid procedure or argument) when I have a slicer?

Code:
  Sub ptupdate()

    With ActiveSheet
        Sheets("Sheet1").PivotTables("Pivot").ChangePivotCache ActiveWorkbook. _
            PivotCaches.Create(SourceType:=xlDatabase, _
            SourceData:="Data")
    End With
 
Upvote 0

Forum statistics

Threads
1,215,427
Messages
6,124,830
Members
449,190
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top