+ Reply to Thread
Results 1 to 3 of 3

Thread: Accessing data in pivot tables

  1. #1
    davidhwang@usa.com
    Guest

    Accessing data in pivot tables

    Hi, I'm trying to access data sitting inside a pivot table. When I
    record a macro, it uses the GETPIVOTDATA function.

    ActiveCell.FormulaR1C1 = _
    "=GETPIVOTDATA(""MR#"",R10C2,""Biopsy Year"",1993,""family
    hx2"",""U"")/GETPIVOTDATA(""MR#"",R10C2,""Biopsy Year"",1993)"

    Is there a more direct way to access the data without having to set the
    value within another cell?

    David


  2. #2
    Debra Dalgleish
    Guest

    Re: Accessing data in pivot tables

    What are you trying to pull from the pivot table? There's also a
    GetPivotData method that you can use, following the examples in Excel's
    Help.

    If you want to record a macro without using the GetPivotData function,
    you can turn it off. There are instructions here:

    http://www.contextures.com/xlPivot06.html

    davidhwang@usa.com wrote:
    > Hi, I'm trying to access data sitting inside a pivot table. When I
    > record a macro, it uses the GETPIVOTDATA function.
    >
    > ActiveCell.FormulaR1C1 = _
    > "=GETPIVOTDATA(""MR#"",R10C2,""Biopsy Year"",1993,""family
    > hx2"",""U"")/GETPIVOTDATA(""MR#"",R10C2,""Biopsy Year"",1993)"
    >
    > Is there a more direct way to access the data without having to set the
    > value within another cell?
    >
    > David
    >



    --
    Debra Dalgleish
    Contextures
    http://www.contextures.com/tiptech.html


  3. #3
    davidhwang@usa.com
    Guest

    Re: Accessing data in pivot tables

    Finally got around to trying it. Thanks for the help. I wasn't able
    to see that option because my Excel Help is messed up.

    Another questions: Is there a way to see all the values for a certain
    field? For the example I show below, I'm using a biopsy year of 1993,
    but is there a way to find out all the years that exist in the "biopsy
    year" field?

    Debra Dalgleish wrote:
    > What are you trying to pull from the pivot table? There's also a
    > GetPivotData method that you can use, following the examples in Excel's
    > Help.
    >
    > If you want to record a macro without using the GetPivotData function,
    > you can turn it off. There are instructions here:
    >
    > http://www.contextures.com/xlPivot06.html
    >
    > davidhwang@usa.com wrote:
    > > Hi, I'm trying to access data sitting inside a pivot table. When I
    > > record a macro, it uses the GETPIVOTDATA function.
    > >
    > > ActiveCell.FormulaR1C1 = _
    > > "=GETPIVOTDATA(""MR#"",R10C2,""Biopsy Year"",1993,""family
    > > hx2"",""U"")/GETPIVOTDATA(""MR#"",R10C2,""Biopsy Year"",1993)"
    > >
    > > Is there a more direct way to access the data without having to set the
    > > value within another cell?
    > >
    > > David
    > >

    >
    >
    > --
    > Debra Dalgleish
    > Contextures
    > http://www.contextures.com/tiptech.html



+ 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.2.0