Pivottable ShowDetail reset

Tim B C

New Member
Joined
Aug 16, 2007
Messages
7
I have a pivot table (working very nicely thankyou!!) which shows the following headings (with an example of data):

SITE MANAGER...SAP Code.............................Site Reference.............Site Name
[+]Dylan Thorley

Clicking the [+] by a Site Manager's name reveals the SAP codes for that Site Manager:

SITE MANAGER...SAP Code.............................Site Reference.............Site Name
[-]Dylan Thorley [+]1101520000C2208070500
........................[+]1101520003C2208070500
........................[+]1101520003C2208072000
........................[+]1101520003C2208072010
........................[+]1101520003C2208072020
........................[+]1101520003C2208072030

Clicking the [+] by a SAP Code reveals the Site References for that code:

SITE MANAGER...SAP Code.............................Site Reference.............Site Name
[-]Dylan Thorley [+]1101520000C2208070500
........................[+]1101520003C2208070500
........................[-]1101520003C2208072000.....[+]NG027
......................................................................[+]NG058
........................[+]1101520003C2208072010
........................[+]1101520003C2208072020
........................[+]1101520003C2208072030

But there are two things I've been trying to get through VBA, which I'd have thought relatively simple, but just CCAAANNN'T get it!!!
1) Each Site Reference has only one Site Name, so I would like it that, whenever a Site Reference is revealed, the Site Name comes up with it.
2) If the [-] by the Site Manager's name is clicked, the other fields all close up - fine! But if it is clicked to open again, whatever was opened before,will open again, e.g. If I clicked by Dylan Thorley, all the SAP Codes and Site references would go, but clicking again would open up the SAP codes, AND whatever Site References and names were also left open. What I want is for a 'reset' so that 2nd clicking the [+] by the name will ONLY open the list of SAP Codes. I know closing back through the fields will do this but you know what Site Managers are like!!! (well you can guess) , so I want it that whenever the site manager closes his list, it comes up 'fresh' each time, ready to click on a different SAP code to reveal the Site References for that. I hope this is clear enough.

Your help would be very much appreciated - thanks in anticipation!

Tim C
 
Last edited:

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top