Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I wonder if someone can help me create variable nuumber of months pivot table report based on start date and end date parameters set by the end user. I've gotten as far as list boxes that define 4 names for the the start and end dates: BegMo, BegYr, EndMo, EndYr and I have my data element "End Month-Year" in the pivot table. The following code allows me to set the table to the two start and end dates defined, but it fails to do two things: a) remove other preset values in "End Month-Year" and b) set "End Month-Year" to select all values between "BegMo & BegYr" and "EndMo & EndYr" Help with this? Ryan -- Stanford Research Administration Financial Management Analyst |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Forgot to reference the offending code: ;^)
BegMo = Range("E1") BegYr = Range("F1") EndMo = Range("G1") EndYr = Range("H1") Set pvtTable = Worksheets("Projection Summary").Range("D13").PivotTable With ActiveSheet.PivotTables("PivotTable1").PivotFields ("End Month-Year") .PivotItems(BegMo & " " & BegYr).Visible = True ActiveSheet.PivotTables("PivotTable1").PivotFields ("End Month-Year") .PivotItems(EndMo & " " & EndYr).Visible = True End With "Ryan Hartnett" wrote: Hi, I wonder if someone can help me create variable nuumber of months pivot table report based on start date and end date parameters set by the end user. I've gotten as far as list boxes that define 4 names for the the start and end dates: BegMo, BegYr, EndMo, EndYr and I have my data element "End Month-Year" in the pivot table. The following code allows me to set the table to the two start and end dates defined, but it fails to do two things: a) remove other preset values in "End Month-Year" and b) set "End Month-Year" to select all values between "BegMo & BegYr" and "EndMo & EndYr" Help with this? Ryan -- Stanford Research Administration Financial Management Analyst |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot Table external XLS file source change and GETPIVOTDATA refresh | Excel Discussion (Misc queries) | |||
Using Pivot Table Values | Excel Discussion (Misc queries) | |||
Need to Improve Code Copying/Pasting Between Workbooks | Excel Discussion (Misc queries) | |||
Help PLEASE! Not sure what answer is: Match? Index? Other? | Excel Worksheet Functions | |||
Pivot Table - max rows allowed in data range | Excel Discussion (Misc queries) |