+ Reply to Thread
Results 1 to 9 of 9

Excel 2007 : Pivot Table Add All Fields

  1. #1
    Registered User
    Join Date
    06-18-2009
    Location
    Newburyport, MA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Pivot Table Add All Fields

    I have a pivot table that captures 284 columns, and I need to include all of the columns. I have to repeat this weekly, so I would like to find a way to "check off" all of the fields to be included in the pivot table without having to click 284 times, is this possible?

    My other option is to use the "Sub Total" function, but I would prefer to use pivot tables if possible since I am more familiar. Even with the Sub Total it looked like I was running into the same issue of having to click every column to be totaled.

    Help!

    Thanks in advance.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Pivot Table Add All Fields

    You have 284 columns, ok... but... are all the fields to act as Data Fields ie no Row Fields / Columns Fields / Page Fields ?
    (XL2007 read as Row Labels / Column Labels / Report Filters)

    I presume also you must be using XL2007 given the # of columns in use - your profile implies otherwise (XL2003)

  3. #3
    Registered User
    Join Date
    06-18-2009
    Location
    Newburyport, MA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Pivot Table Add All Fields

    Thanks for the reply....all of the fields are data fields containing statistics for a sports team. To be specific, the stats are captured on a per game basis, and I am capturing them on a per player basis. So my pivot table takes each stat (column) and sums up the column to give me a per play season stat.

    To answer your question, I believe that each column is a data field. My problem literally is I have to check off each box in the pivot table wizard (284 times) multiple times a week which I feel there has to be a better way.

    Also, I am using XL2007, I have switched since creating the profile.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Pivot Table Add All Fields

    Still slightly curious as your prior post would imply at least one Row Label field (player) but based on your request perhaps something along the lines of:

    Please Login or Register  to view this content.
    Change that in red to reflect your actual setup - sheet name / PT name etc...

  5. #5
    Registered User
    Join Date
    06-18-2009
    Location
    Newburyport, MA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Pivot Table Add All Fields

    You are 100% correct, I do have a row field which is player_id. I ran the sub you included below, but I received an error with this line:

    .AddDataField(.PivotFields(lngField)).Function = xlSum

    Any idea why that would throw an error? Thank you so much for the help.

  6. #6
    Registered User
    Join Date
    06-18-2009
    Location
    Newburyport, MA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Pivot Table Add All Fields

    It looks like when I get to column KE it will no longer let me add fields to the pivot table.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Pivot Table Add All Fields

    Sorry, yes, restricted to 256 column fields.
    (I didn't check on that volume of data)

  8. #8
    Registered User
    Join Date
    06-18-2009
    Location
    Newburyport, MA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Pivot Table Add All Fields

    Thanks for all the help. It looks like I am going to have to use a combination of SUMIF, AVERAGEIF to arrive at the per player stats.

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Pivot Table Add All Fields

    Given you're using 2007 note also:

    SUMIFS / COUNTIFS / AVERAGEIF / AVERAGEIFS

    The above are not available in earlier versions but can generally help keep calcs relatively efficient in XL2007 when compared to SUMPRODUCT and Arrays (often used in earlier versions (rightly/wrongly))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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