Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Refresh Pivot Table from other worksheet cell entry

Hello
I am needing to write a code so that if I was to enter a value into a
particular column (say A:A) on one worksheet (named Sheet1), the PivotTable1
on another worksheet (named Sheet2) will refresh. I'm sure this will be easy
for someone out there!

Thanks in advance!

Shane.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Refresh Pivot Table from other worksheet cell entry

You could refresh the pivot table when Sheet2 is activated.

Right-click on the Sheet2 tab, choose View Code, and paste the following
code where the cursor is flashing:

Private Sub Worksheet_Activate()
PivotTables(1).PivotCache.Refresh
End Sub


ShaneS wrote:
Hello
I am needing to write a code so that if I was to enter a value into a
particular column (say A:A) on one worksheet (named Sheet1), the PivotTable1
on another worksheet (named Sheet2) will refresh. I'm sure this will be easy
for someone out there!

Thanks in advance!

Shane.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Refresh Pivot Table from other worksheet cell entry

Thanks Debra.
I have this code on sheet2 already and it is very useful. But I still need
to be able to refresh when entering text into a column from another
worksheet, as this sheet shows a reference from the pivot table. As it is, I
need to refresh sheet2, and then go back to sheet1. Is it possible to refresh
from a particular column entry in sheet1?

Thanks.
Shane.

"Debra Dalgleish" wrote:

You could refresh the pivot table when Sheet2 is activated.

Right-click on the Sheet2 tab, choose View Code, and paste the following
code where the cursor is flashing:

Private Sub Worksheet_Activate()
PivotTables(1).PivotCache.Refresh
End Sub


ShaneS wrote:
Hello
I am needing to write a code so that if I was to enter a value into a
particular column (say A:A) on one worksheet (named Sheet1), the PivotTable1
on another worksheet (named Sheet2) will refresh. I'm sure this will be easy
for someone out there!

Thanks in advance!

Shane.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Refresh Pivot Table from other worksheet cell entry

You can use the Worksheet_Change event on Sheet1, e.g.:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 Then
Sheets("Sheet2").PivotTables(1).PivotCache.Refresh
End If
End Sub


ShaneS wrote:
Thanks Debra.
I have this code on sheet2 already and it is very useful. But I still need
to be able to refresh when entering text into a column from another
worksheet, as this sheet shows a reference from the pivot table. As it is, I
need to refresh sheet2, and then go back to sheet1. Is it possible to refresh
from a particular column entry in sheet1?

Thanks.
Shane.

"Debra Dalgleish" wrote:


You could refresh the pivot table when Sheet2 is activated.

Right-click on the Sheet2 tab, choose View Code, and paste the following
code where the cursor is flashing:

Private Sub Worksheet_Activate()
PivotTables(1).PivotCache.Refresh
End Sub


ShaneS wrote:

Hello
I am needing to write a code so that if I was to enter a value into a
particular column (say A:A) on one worksheet (named Sheet1), the PivotTable1
on another worksheet (named Sheet2) will refresh. I'm sure this will be easy
for someone out there!

Thanks in advance!

Shane.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Refresh Pivot Table from other worksheet cell entry

Great!
Works a treat. Thanks Debra.

"Debra Dalgleish" wrote:

You can use the Worksheet_Change event on Sheet1, e.g.:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 Then
Sheets("Sheet2").PivotTables(1).PivotCache.Refresh
End If
End Sub


ShaneS wrote:
Thanks Debra.
I have this code on sheet2 already and it is very useful. But I still need
to be able to refresh when entering text into a column from another
worksheet, as this sheet shows a reference from the pivot table. As it is, I
need to refresh sheet2, and then go back to sheet1. Is it possible to refresh
from a particular column entry in sheet1?

Thanks.
Shane.

"Debra Dalgleish" wrote:


You could refresh the pivot table when Sheet2 is activated.

Right-click on the Sheet2 tab, choose View Code, and paste the following
code where the cursor is flashing:

Private Sub Worksheet_Activate()
PivotTables(1).PivotCache.Refresh
End Sub


ShaneS wrote:

Hello
I am needing to write a code so that if I was to enter a value into a
particular column (say A:A) on one worksheet (named Sheet1), the PivotTable1
on another worksheet (named Sheet2) will refresh. I'm sure this will be easy
for someone out there!

Thanks in advance!

Shane.


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html




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
Create refresh button in worksheet to refresh Pivot Table Data Ron Excel Worksheet Functions 1 October 13th 07 01:20 AM
Adding button to worksheet to refresh pivot table data Ron Excel Worksheet Functions 1 October 11th 07 12:13 PM
refresh a new worsheet on pivot table refresh [email protected] Excel Worksheet Functions 0 February 9th 07 07:39 PM
Timing of automatic query refresh and macro pivot table refresh dutty Excel Programming 2 December 1st 04 07:19 PM
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH Ken Roberts Excel Programming 3 September 11th 03 06:02 AM


All times are GMT +1. The time now is 06:53 AM.

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

About Us

"It's about Microsoft Excel"