which pivot table is not refreshing

needexcelhelpnow

New Member
Joined
Aug 1, 2018
Messages
2
I have an excel workbook with lots and lots of sheets. Each sheet feeds into at least two pivot tables, so I have 100 + pivot tables in the workbook.

When I hit "refresh all" to update all the pivot tables, I’ve getting an error message “One or more field names used in the report are no longer valid. If you’re changing the name of a field in your data source, please type a new name in the field. One or more connections didn't refresh or the refresh operation was cancelled. would you like to refresh the remaining connections? ” . I want to know which particular pivot table is this error for?

Any thoughts?

Thank you much!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Try running this code. Might need to do it more than once:

Code:
Sub pivot()

On Error GoTo errhandler

For Each sh In ThisWorkbook.Worksheets
    For Each pt In sh.PivotTables
        pt.PivotCache.Refresh
    Next
Next

Exit Sub

errhandler:

MsgBox sh.Name & ", " & pt.Name

End Sub
 
Upvote 0
You my friend are amazing! Thank you.


Try running this code. Might need to do it more than once:

Code:
Sub pivot()

On Error GoTo errhandler

For Each sh In ThisWorkbook.Worksheets
    For Each pt In sh.PivotTables
        pt.PivotCache.Refresh
    Next
Next

Exit Sub

errhandler:

MsgBox sh.Name & ", " & pt.Name

End Sub
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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