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

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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,425
Messages
6,124,824
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