Pivot Table Data Automatic Refresh

mianmazher

Active Member
Joined
Jan 24, 2004
Messages
412
Hi All Excel Experts

I have made a pivot table using multiple consolidtion across multiple sheets


I want the pivot table data to be refreshed automatically when some thing is changed /altered in ant of the sheets.


Can It be done ?


If so Plz Help.


Regards


Mian Mazher
 

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

mianmazher

Active Member
Joined
Jan 24, 2004
Messages
412
Hi Mr Excel forum Experts

Me still waiting for some one to reply


Plz help


Regards


Mian Mazher
 

mikeprice53

Active Member
Joined
Jan 21, 2003
Messages
297
Try using a method similar to this:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Sheets("Sheet2").PivotTables("PivotTable1").PivotCache.Refresh
End Sub

Use a Screen updating Method If you want for it to run faster but note if you have a lot of data in there it will be doing one heck of a lot of work !
 

mikeprice53

Active Member
Joined
Jan 21, 2003
Messages
297
In Excel Hit Alt + F11 and add that code to the ThisWorkbook VBA sheet.

Have your data in sheet1 and your pivot table you have created in sheet2, if you want to rename your sheets be sure to rename them the code where you see Sheet1 and Sheet2 for the code to run, it is very simple code as I do not profess to be a wizard but it should do what you are asking from it !

good luck ! If you are still struggling just post back my friend ! :)
 

Watch MrExcel Video

Forum statistics

Threads
1,126,981
Messages
5,621,958
Members
415,869
Latest member
LWSkinner

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