+ Reply to Thread
Results 1 to 3 of 3

macro to open out pivot table results?

  1. #1
    Registered User
    Join Date
    08-30-2006
    Posts
    40

    macro to open out pivot table results?

    Is it possible to make a macro open up tabs displaying the results of a pivot table? I have a pivot that breaks down the volume of orders in process, showing a sub-total for each associate and then a grand total. Currently, once the automated part of my report completes, I build a tab for each associate by double clicking each of their subtotals and then renaming the sheet that gets created with their name. The code below is what excel recorded when I performed this function manually, I can't use it though because the pivot table changes size each day depending on order volumes. The first tab I need to create is "blank" which means all orders that don't have a name assigned to them. Instead of looking in the sheet and seeing that the total count of orders belong to "blank" is in cell F10 and then using the showdetail command to open it out, is there a way I can just say Show Detail of Pivottable1,blank,grand total? And can I have it name the detail tab "blank" instead of defaulting to "sheet1" and having to change it? If the user has already created other sheets before executing the macro, sheet1 won't be the tab that needs to be called "blank"...

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    08-30-2006
    Posts
    40
    Ok, I figured out a somewhat shade tree way to accomplish this...ALMOST. I decided to use the find function to find the line that says "(blank) Total" and then used CTRL+right arrow to go all the way to the right of the sheet 15 times to make sure its definately all the way over, then CTRL+left to bring it back to the last populated column, which SHOULD always be the total. The code looks like this:

    Please Login or Register  to view this content.
    Now the only problem I have left is this part:
    Please Login or Register  to view this content.
    The sheet isn't always going to be Sheet1, is there a way that I can make it select the sheet that was just created in the ShowDetail command regardless of what the sheet is named?

  3. #3
    Registered User
    Join Date
    08-30-2006
    Posts
    40
    I'm still stumped...any ideas?

+ 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