Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Kim Kim is offline
external usenet poster
 
Posts: 284
Default Macro for auto refresh

Is there a macro where I change a cell in one sheet and the pivot table will
auto refresh.

If I change the cell B18 in Dashboard sheet, the pivot table in City sheet
will refresh automatically.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Macro for auto refresh

Right click on Dashboard sheet tab, view code, paste this in:

'=====
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B18")) Is Nothing Or _
Target.Count 1 Then Exit Sub
'Refreshes all PivotTables in workbook
ThisWorkbook.RefreshAll
End Sub
'======

Note that this requires you the user to change cell B18. The event will not
be triggered if B18 contains a formula whose result changes.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Kim" wrote:

Is there a macro where I change a cell in one sheet and the pivot table will
auto refresh.

If I change the cell B18 in Dashboard sheet, the pivot table in City sheet
will refresh automatically.

Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Excel functions formula and auto refresh refresh Pauline Cheong Excel Worksheet Functions 3 February 16th 09 01:23 AM
How can I auto refresh a column that has an auto filter in place Pastal Excel Discussion (Misc queries) 1 December 18th 07 11:43 AM
Running a macro from an auto-refresh Chris Youlden Excel Worksheet Functions 2 October 7th 07 04:22 PM
auto refresh Lou Sanderson Excel Discussion (Misc queries) 2 August 17th 06 05:45 PM
How can I auto-refresh auto-filters when data changes? Mike@MPWco Excel Worksheet Functions 0 July 4th 06 12:50 PM


All times are GMT +1. The time now is 04:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"