Update PivotTable When Data Source Changes | Automatically Refresh a PivotTable With New Data

Описание к видео Update PivotTable When Data Source Changes | Automatically Refresh a PivotTable With New Data

Download the featured file and code here: https://www.bluepecantraining.com/wp-...

Here's the code:
Private Sub Worksheet_Change(ByVal Target As Range)
Sheet4.PivotTables("PivotTable3").PivotCache.Refresh
End Sub

In this video, I demonstrate how to automatically update a PivotTable when its data source changes. The data source would change when new records are added or existing records are changed. A completely new data source may also be specified for a PivotTable.

I also explain how housing your data in an Excel table makes it easier to update your PivotTable's data source.

Finally, I provide a way of automatically updating a PivotTable when its data source changes using a VBA Macro. This macro uses the worksheet 'change' event to update the pivot cache. Here is the code featured in the video:
------------------------

Комментарии

Информация по комментариям в разработке