Show Excel Pivot Table Source in Cell

PaulL

New Member
Joined
Mar 26, 2009
Messages
2
I'm creating a pivot table for some accounting auditors. They would like me to show the Source Spreadsheet name in a cell at the top of the Pivot Table sheet for documentation.

Is there a way to do this?

Thanks

Paul
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

PCL

Well-known Member
Joined
Jul 15, 2008
Messages
1,348
Next UDF could help.
Assuming Pivot Table name is PT_Test
In a cell somewhere = sheet_Name("PT_Test")

Code:
Option Explicit
Function SHEET_NAME(TABLE_NAME As String) As String
    Dim PT As PivotTable
    Dim I As Integer
    On Error GoTo NO_PT
    Set PT = ActiveSheet.PivotTables(TABLE_NAME)
    SHEET_NAME = PT.SourceData
    I = InStr(PT.SourceData, "!")
    SHEET_NAME = Left(SHEET_NAME, I - 1)
NO_PT:
End Function
 

Watch MrExcel Video

Forum statistics

Threads
1,123,259
Messages
5,600,575
Members
414,390
Latest member
plimbu

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
Top