+ Reply to Thread
Results 1 to 7 of 7

Macro to show pivot table details..Any ideas?

  1. #1
    Registered User
    Join Date
    02-18-2009
    Location
    Ontario
    MS-Off Ver
    Excel 2003
    Posts
    16

    Macro to show pivot table details..Any ideas?

    Hello,

    I have a pivot table in a tab called billing.

    The size of this pivot table depends on how many different customers are in the data tab.

    What I want is a macro that will show the details as if you were to double click on the grandtotal, but the grandtotal in column c is never in the same row and I am having difficulty coming up with a macro to do this.

    There are some other functions it is performing as well so I just need to add this to the existing macro code.

    Thanks
    Greg
    Last edited by VBA Noob; 02-26-2009 at 01:25 PM.

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

    Re: Macro to show pivot table details

    Greg, without seeing the PT etc it's hard to comment... if we assume

    a) Grand Total always appear in Column A
    b) Field in question always appears in Column C

    Then perhaps along the lines of:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-18-2009
    Location
    Ontario
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Macro to show pivot table details

    Hello,

    I tried just pasting that macro in and I got the error message. Here is what the PT looks like.

    Hopefully this will help

    Thanks Again
    Greg
    Attached Images Attached Images

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

    Re: Macro to show pivot table details

    Per the annotation in the code did you alter the sheet name being referenced to be that containing the Pivot Table ?

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-18-2009
    Location
    Ontario
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Macro to show pivot table details

    I did change it, now its crashing my excel sheet.

    It keeps coming up with the error message, over and over again even after I click OK on it.

    Any ideas?

    Thanks Greg

    Here is the code:

    Please Login or Register  to view this content.

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

    Re: Macro to show pivot table details..Any ideas?

    I'm not quite sure where to begin but first to resolve your issue (I hope) you need to change the below section:

    Please Login or Register  to view this content.
    To something more along the lines of:

    Please Login or Register  to view this content.
    As it is you're going into the error handler as part of the routine and thus a perpetual loop... also as above you should be resetting your App settings to TRUE not FALSE ... Events unlike ScreenUpdating will not reset to True by default and is pretty much guaranteed to cause you major headaches.

  7. #7
    Registered User
    Join Date
    02-18-2009
    Location
    Ontario
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Macro to show pivot table details..Any ideas?

    That works perfectly.


    Thanks for your help.

    Greg

+ 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