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
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi Mr Excel forum Experts

Me still waiting for some one to reply


Plz help


Regards


Mian Mazher
 
Upvote 0
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 !
 
Upvote 0
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 ! :)
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

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