Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Pivot Tables

  1. #1
    New Member
    Join Date
    Mar 2002
    Location
    London
    Posts
    46
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi all,

    I have a macro which pulls data from the totals row of a pivot table. The amount of rows in the pivot table is determined by records in an ODBC link from a database. The problem is, this means the amount of rows changes and therefore the totals row of the pivot table is not in a static position.

    e.g.
    the ODBC link has figures relating to four different people - Bob, Harry, Fred and Bert. The sum of their totals is stored in cell F3. So the macro grabs the data from F3. However the following day Jane is added to the data in the ODBC link, pushing the total to cell G3. The macro is still set at F3 so it now picks up the wrong figure.

    Make sense? Is there a way around this?

    Thanks for any help

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi

    There sure is:

    http://www.ozgrid.com/Excel/DynamicRanges.htm

    These are ideal for Pivot Tables

  3. #3
    New Member
    Join Date
    Mar 2002
    Location
    London
    Posts
    46
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Cheers Dave.

    Spent ages trying to sort that one out.

    Greg

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Use the GETPIVOTDATA worksheet function. See the Help index topic for this function.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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