+ Reply to Thread
Results 1 to 7 of 7

collapsing/expanding pivot table fields in excel 2003

  1. #1
    Forum Contributor
    Join Date
    08-17-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    158

    collapsing/expanding pivot table fields in excel 2003

    Hello,

    I have developed a pivot table in excel 2007 along with some code that expands/collapses fields. When I open the file in 2003, and I try to run the code it errors out. Not sure how to make this code compatible for BOTH 2003 and 2007. The code for expanding/collapsing my fields that i have generated and works in 2007 is as follows:



    Please Login or Register  to view this content.
    Does anyone have any suggestions? Thank you

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: collapsing/expanding pivot table fields in excel 2003

    Hi

    Can you upload the 2007 .xlsm workbook?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    08-17-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    158

    Re: collapsing/expanding pivot table fields in excel 2003

    Hey Richard,

    Please see the example workbook I have attached. This is not the target workbook but it is does exactly what I need it to do. Again, I need this to work in both excel 2003 version as well as excel 2007.

    Thanks!
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    08-17-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    158

    Re: collapsing/expanding pivot table fields in excel 2003

    Anyone? Need help on this ASAP!

  5. #5
    Forum Contributor
    Join Date
    08-17-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    158

    Re: collapsing/expanding pivot table fields in excel 2003

    Hey Richard,

    I just realized that the data source for the pivot table isn't maintained...Not sure why, but this isn't a problem for my target workbook. So if you don't mind, please change the data source to the entire data set on the data tab (A1:E440). Then Drag the fields on the pivot table field list to the following:

    Report Filter:
    - League
    - Team

    Column Labels:
    - Date

    Row Labels:
    - Player Name

    Sum of Values:
    - Pos

    In order to get the Expand/Collapse buttons to work in the workbook, you will need to group the Date columns:
    - Everything including January I grouped to be Group 1
    - Everyting including February I grouped to be Group 2

    Once these are complete, you can use the expand/collapse button. If you have any questions, please let me know! This should only take 1 minute...and i do apologize that the pivot table doesn't maintain the data source. But please keep in mind, that this is not an issue with my target workbook!

  6. #6
    Forum Contributor
    Join Date
    08-17-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    158

    Re: collapsing/expanding pivot table fields in excel 2003

    Sorry I had a workbook_open procedure that was clearing the data source. Now the workbook is formatted for code testing!

    Please see the new attached workbook.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    08-17-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    158

    Re: collapsing/expanding pivot table fields in excel 2003

    Can anyone help me with this!!!?? I really need to get this compatible with 2003.

+ 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