Consulting

Results 1 to 3 of 3

Thread: VBA iteration through pivot table

  1. #1
    VBAX Newbie
    Joined
    Jun 2011
    Posts
    1
    Location

    VBA iteration through pivot table

    Greetings,

    I have a pivot table that I want to reproduce 140 times with different fields in it. The data source is the same for all 140 pivot tables.

    Ok so in the pivot table field list box, I have different fields(144 of them). Is there a way to reference these fields in a code so that I can loop through it to produce different pivot tables? It basically needs to start from the first field till the last field.

    Additional Info:

    In the pivot table field list box: I am dragging three fields into three boxes below.

    One field in the row labels box
    one field in the column labels box, and
    one field in the values box.

    The fields in the column labels box as well as the values box remains the same for all 140 pivot tables. The only field changing is the field in the row labels box.

    I am using Office 2010.


    Thanks

  2. #2
    I read you matter carefully and in my point of view there is no reference to field in the code but i am searching in it which i discussed with you later.

  3. #3
    VBAX Newbie
    Joined
    Jun 2011
    Posts
    1
    Location
    Quote Originally Posted by Bradley123
    I read you matter carefully and in my point of view there is no reference to field in the code but i am searching in it which i discussed with you later.
    One way that I thought of is indexing the field list before creating the pivot table.. eg, from 1 to 144. then have a code iterating (maybe a do loop?) through it, for i =1, i = i +1 . something like that.

    What do you think

Posting Permissions

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