+ Reply to Thread
Results 1 to 5 of 5

Pivot table refresh ??

  1. #1
    Registered User
    Join Date
    12-29-2009
    Location
    Washington State, USA
    MS-Off Ver
    Excel 2008 - Mac
    Posts
    15

    Unhappy Pivot table refresh ??

    I am running XL 2004

    I have a 'refresh pivot table' problem; ie, it will not refresh and show additions to the source LIST.

    I have tried making a 'dynamic' range of my list and that doesn't seem to do anything. But, without it, when I refresh, (manually or through the above VBA code, nothing updates.

    Question: "Is it necessary to make the LIST dynamic to be able to refresh a PT and see additional rows in the source? Or, can I just define the source and let the automatic LIST expansion somehow be reflected in the PT?

    Thanks

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Pivot table refresh ??

    Question: "Is it necessary to make the LIST dynamic to be able to refresh a PT and see additional rows in the source? Or, can I just define the source and let the automatic LIST expansion somehow be reflected in the PT?
    We could provide better answers if you upload your workbook (remove/disguise sensitive data).
    IMO, if you expect the source data to grow/shrink, then the PT should be based on a dynamic named range. Are you certain you have created a DYNAMIC named range and not simply a named range (static)? At least, post the formula for the named range.

    Edit: You can check to see if the Pivot Table is updating by doing the following:
    Change a numeric cell in the source data to an extreme number or delete a few cells.
    Go to the PT, note the existing results, then do a refresh. If it updates, then the problem with it not updating relative to your named range points to the named ranges as the possible cause of the problem.
    Last edited by Palmetto; 01-12-2010 at 06:11 PM. Reason: Added additional comments
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Pivot table refresh ??

    Palmetto is absolutely right that uploading an example would help, but to answer the specific question:
    It is not necessary to define a dynamic range in order to refresh a pivot table and have new values in the source data reflected in the pivot. It is necessary to define a dynamic named range if you need to redefine the size of the pivot source. In terms of manual refresh or VBA, there is no functional difference - VBA is 'simple', it's not a bad understanding to think of many VBA methods as simply pressing the relevant buttons for you.

    I think, however, that your problem is possibly a bit more simple. Defining a DNR is one thing, you then need to set the source of the pivot to that defined name. NB the default name inserted by the pivot table wizard will not be a named range (i.e. if your DNR, "myrange", evaluates to A3:C10 the PT wizard will propose the source A3:C10, which would need to be overwritten with "myrange").

    CC
    Last edited by Cheeky Charlie; 01-12-2010 at 05:43 PM. Reason: badly phrased

  4. #4
    Registered User
    Join Date
    12-29-2009
    Location
    Washington State, USA
    MS-Off Ver
    Excel 2008 - Mac
    Posts
    15

    Re: Pivot table refresh ??

    Quote Originally Posted by CC
    In terms of manual refresh or VBA, there is no functional difference - VBA is 'simple', it's not a bad understanding to think of many VBA methods as simply pressing the relevant buttons for you.

    I think, however, that your problem is possibly a bit more simple. Defining a DNR is one thing, you then need to set the source of the pivot to that defined name. NB the default name inserted by the pivot table wizard will not be a named range (i.e. if your DNR, "myrange", evaluates to A3:C10 the PT wizard will propose the source A3:C10, which would need to be overwritten with "myrange").

    CC

    Thanks for the ideas. My application is basically a check register so I NEED to have the ability to have successive 'rows' added to the LIST. To that end, I created a DNR with this formula: =OFFSET(Sheet1!$A$4,0,0,COUNT(Sheet1!$A:$A),9) named Actual. (there are 9 columns) Next I went to my pivot table and ran the wizard, backedup, and inserted Actual as a name. I got "REFERENCE NOT VALID".

    Also, when I goto a new row, XL takes about 20 seconds to 'reclaculate the PT'.... I don't think that is how it supposed to be. The only VB I have is this:

    Please Login or Register  to view this content.
    Here is the file: (I just figured out how to upload it) budget2.xls
    Last edited by DonkeyOte; 01-13-2010 at 06:04 AM. Reason: modified all tags (was a mess)

  5. #5
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Pivot table refresh ??

    First, please amend your thread to use code tags per forum rules.

    Your Dynamic Named Range is invalid because you are using the wrong function in the formula. You should be using COUNTA not COUNT. The latter only works with numeric values, whereas COUNTA works with both text and numeric values.

    I would place the code in Sheet2 and use the sheet_activate event.

+ 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