+ Reply to Thread
Results 1 to 3 of 3

vba code to Update Pivot Table source data

  1. #1
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2010
    Posts
    278

    vba code to Update Pivot Table source data

    I have code to query a database and return data to the "data" sheet.

    The number of rows of data returned will vary.

    There is a pivot table on the "subtotal" sheet named "PT1" (it is the only PT in the workbook).

    Through VBA code, how do I tell the pivot table to update the range of the source data (which is really to update the last row).

    (Selecting CTRL-End, goes past where the actual data ends)

    Thank you.
    Last edited by ker9; 09-13-2010 at 04:38 PM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,983

    Re: vba code to Update Pivot Table source data

    See this tip on Debra Dalgleish's site.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2010
    Posts
    278

    Re: vba code to Update Pivot Table source data

    That is so awesome - thank you for pointing me there!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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