Listing of Pivot Table in a worksheet

  • Thread starter Thread starter ldc
  • Start date Start date
L

ldc

Is there a function similar to "Insert-Name-Paste-Paste List" for pivot
tables, where I can generate a list of all pivot tables and where they are
located in the spreadsheet?
 
ldc said:
Is there a function similar to "Insert-Name-Paste-Paste List" for pivot
tables, where I can generate a list of all pivot tables and where they are
located in the spreadsheet?

A google search revealed a sub by Charles Chickering, pasted below:
-------------------
Sub ListPivotTables()
Dim PT As PivotTable
Dim Sh As Worksheet
Dim lSh As Worksheet 'Loop Sheet
Set Sh = Worksheets.Add
Sh.Range("A1") = "Pivot Table Name"
For Each lSh In ActiveWorkbook.Worksheets
For Each PT In lSh.PivotTables
Sh.Range("A" & Sh.Rows.Count).End(xlUp).Offset(1) = PT.Name
Next
Next
End Sub
 
This worked great to list the pivot tables. Anything to show location of the
pivot table or the data range the pivot table is using?
 
If nobody else jumps in here, suggest you try a new posting in .programming.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top