+ Reply to Thread
Results 1 to 2 of 2

Pivot Table

Hybrid View

saran26 Pivot Table 04-14-2009, 05:09 PM
Chance2 Re: Pivot Table 04-14-2009, 05:56 PM
  1. #1
    Registered User
    Join Date
    04-02-2009
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    16

    Pivot Table

    Hi All,

    I jave a pivot table in my excel sheet with a specified range.

    When values are changed in the excel sheet the pivot table is not changing its contents automatically.

    I have top manualy do an refresh. How to avoid this


    How to change the pivot table , so that when ever any thing is changed in the range, the pivot tables gets the values automatically.


    Please let me knoW



    Thanks
    Saran

  2. #2
    Forum Contributor
    Join Date
    04-01-2009
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    280

    Re: Pivot Table

    Are you just talking about the data change or are you adding rows (selection change)?

    If you are just talking about data, then you could add code to the data worksheet's SelectionChange module...

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        Sheets("Sheet2").PivotTables("PivotTable2").PivotCache.Refresh
    End Sub
    In my example "Sheet2" is the sheet name with the pivot table and "PivotTable2" is the pivot table name.

    It is a little more complicated if you are adding rows, but basically you could add your rows and then record a macro of the pivot wizard. You will still need some coding, but I think you'll get the idea.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1