+ Reply to Thread
Results 1 to 7 of 7

Pivot table - GetData

  1. #1
    Guest
    Join Date
    05-15-2009
    Location
    Paris, France
    MS-Off Ver
    Excel 2003
    Posts
    40

    Pivot table - GetData

    Hi,

    I am trying to extract some data from a pivot table. One of my columns is Cars and it contains race car numbers. Another Column is Driver and for each of the previous cars I have 2 to 3 drivers. To each of these cars/drivers are associated lap time data (best, mean, number of laps, etc).

    An example of what I would like to do is to extract the mean lap time for the driver X from the car Y. I imagine it would be something like that :

    For Each car in Pvt.PivotFields("Cars").PivotItems
    For Each driver in car
    ....
    Next
    Next

    but I can't manage to make it work....

    any ideas on how to do it?
    Cheers
    Last edited by Astrid; 05-20-2011 at 06:04 AM.

  2. #2
    Guest
    Join Date
    05-15-2009
    Location
    Paris, France
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Pivot table - GetData

    Has anyone got an idea please?
    Cheers

  3. #3
    Guest
    Join Date
    05-15-2009
    Location
    Paris, France
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Pivot table - GetData

    I would really appreciate any help or ideas on this please, it's becoming rather urgent that I make it work and I've run out of new ideas to try.....
    Cheers

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,265

    Re: Pivot table - GetData

    It would be helpful if you could post a sample of your layout to clarify what exactly you want.
    Remember what the dormouse said
    Feed your head

  5. #5
    Guest
    Join Date
    05-15-2009
    Location
    Paris, France
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Pivot table - GetData

    Hi,

    Thanks for getting back.
    Here is a sample of what my data looks like. On one worksheet is the pivot table (it's only a plain table in the sample otherwise the file what too heavy to upload), on another is the other table.
    I want to make a macro that fills in the table with the associated data from the pivot table.

    So it sees car n°1 in the table, it goes to the pivot table, finds the car n°1 then it's first driver and his data, copies it into the table, finds the second driver and his data, copies it into the table, finds the third driver (if any) and copies his data or takes the next car.
    etc etc.

    Does it make any more sense now?
    Attached Files Attached Files

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,265

    Re: Pivot table - GetData

    Based on that would it not be simpler to just reformat the pivot table a bit? There doesn't appear to be a huge difference between the two?

  7. #7
    Guest
    Join Date
    05-15-2009
    Location
    Paris, France
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Pivot table - GetData

    I gave a simple form of the pivot table.
    There are other fields and a lots more cars in the actual table. From there I extract different data in different sheets for further use.

    Maybe my sample was not quite right in the way that I can have like 50 cars in the pivot table but I will only extract data for a few of them (say 10-15, sometimes less)

+ 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