Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Pivot Table Drop Down Macro

I am running a process which downloads information for ~500 people.
This information is then placed into a pivot table and distributed to a
number of managers. Each manager has 10 to 20 people working for
him/her. Currently, a manager must manually select the individuals
from the Names drop down to examine their information. Is there a
macro (which I can provide the managers) which will take a list of
Names, and go to the filed of Names in the pivot table and select only
those names from the drop down list?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Excel Pivot Table Drop Down Macro

Richard

Here are 2 short routines that might help. They allow you to expand and
collapse any field in a pivot table. Collapse will leave only the first item
in a field visible. This way the manager only needs to turn off one persons
data and then check on the few they want to see.

Give your managers 2 buttons on the sheet that conains the pivot. One to
run EXPAND and the other to run COLLAPSE. Then they click the button, type
in the name of the field they want to expand or collapse and that is it.

Mike
Sub TBLcollapse()
Dim PT As PivotTable
Dim STRG1$, itemcnt%

Set PT = ActiveSheet.PivotTables(1)
STRG1 = InputBox("Enter the name of the field you want to collapse",
"COLLAPSE FIELD")
itemcnt = PT.PivotFields(STRG1).PivotItems.Count

For i = 2 To itemcnt
With PT.PivotFields(STRG1)
.PivotItems(i).Visible = False
End With
Next i
Set PT = Nothing
End Sub

Sub TBLexpand()
Dim PT As PivotTable
Dim STRG1$, itemcnt%

Set PT = ActiveSheet.PivotTables(1)
STRG1 = InputBox("Enter the name of the field you want to expand",
"EXPAND FIELD")
itemcnt = PT.PivotFields(STRG1).PivotItems.Count

For i = 1 To itemcnt
With PT.PivotFields(STRG1)
.PivotItems(i).Visible = True
End With
Next i
Set PT = Nothing
End Sub

" wrote:

I am running a process which downloads information for ~500 people.
This information is then placed into a pivot table and distributed to a
number of managers. Each manager has 10 to 20 people working for
him/her. Currently, a manager must manually select the individuals
from the Names drop down to examine their information. Is there a
macro (which I can provide the managers) which will take a list of
Names, and go to the filed of Names in the pivot table and select only
those names from the drop down list?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Pivot Table Drop Down Macro

Thanks - I forgot to mention, I publish an updated report 2 times a
week. Right now, the table is going against ~50,000 records of which I
need to make sophisticated calculations on before loading into a pivot
table. When it grows to 65k - it will be loaded into access in
discrete chunks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i refresh a pivot table drop down list in excel 2003? Greg W Excel Discussion (Misc queries) 0 December 8th 09 05:26 PM
Pivot Table Drop down Dale Hagan Charts and Charting in Excel 2 July 23rd 07 07:20 PM
Pivot Table Drop Down. joebogey Excel Programming 0 May 23rd 05 06:14 PM
Selecting next drop down item in pivot table with a macro ??? Keilan Knight Excel Programming 2 February 22nd 05 11:30 AM
Attaching macro to a pivot table drop down Rob Excel Programming 1 June 27th 04 01:00 AM


All times are GMT +1. The time now is 09:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"