I am trying to do this where the pivot tables and source data are on protected sheets. Recommendations on unprotecting, running this, and then protecting again?
Dear Sir Thank you for your valuable trick. how we open the VB window without short of ALT+F11. Kindly tell me. In the laptop, this combination is not working. This helps me to use this refresh option.
In Laptops, function keys like F11, F10, F9 etc works with Function Key (fn). So, In laptop, you can try ALT + fn + F11.........it should work. Apart from shortcut, you can go to "developer" tab in Menu and then select "Visual Basic" to reach to VBA Editor window. Let me know if it helps......
Thank you so much. It works when I put it in the worksheet, but I have multiple worksheets. Can you please tell me how to put this code for the whole workbook instead of worksheet. Thank you
It is working for all pivot tables across one sheet only. However, you can use the same code on all those sheets, where you have multiple pivot tables. Try it .......if it doesn't work, let me know.
Code is executing, whenever "Enter" is pressed on data sheet. So, once you increase or decrease data and press enter, it would work. You can try at your end and share your experience.
Hello, I would like to split a document by destination (for example) and create automatically various specific files (for each destination) with the relevant pivot chart. How to do to update the data source of the new pivot charts each time (Spain, Italy, France...) ? As they keep the original data source with all destinations (Europe). Thanks Dim pt As PivotTable Dim MyData As Excel.ListObject Set MyData = Application.Range(Europe).ListObject For Each pt In ActiveWorkbook.Worksheets("Chart - City").PivotTables pt.ChangePivotCache ActiveWorkbook.PivotCaches.Create _ (SourceType:=xlDatabase, SourceData:="MyData") Next pt
Thank you for the coding, Query: when I am reducing the rows its refreshing data in pivot table but when I am trying to add rows it's not adding new data in pivot table. Please help on this when data range reduces or increases. Thanks in advance
This macro works fine, but how to save this macro, as whenever I close the Workbook and open next day this macro is missing on source sheet and I need to update the same again. Please help.
@@ExcelDestination I figured it out. I had at least 3 levels of table references in different sheets, and the refreshing isn't linked to the primary worksheet.
You can add a command button and assign this code to command Button. There is a tutorial, you can take help from. Link is given below : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-U4lf-GN0KSo.html