Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
***Originally posted rather sloppily to general questions, but this is more
appropriate here i think. I am trying to create a pivot table report based on start date and end date parameters set by the end user. It will produce a report for a given period of time, by month. Parameters will define the filter in attribute "End Month-Year" of the pivot table. I've gotten as far as list boxes that allow defining of 4 names for the the start and end dates: BegMo, BegYr, EndMo, EndYr and I have my data attribute "End Month-Year" (End in this latter case refers to the end dates of contracts or projects, which is what I am reporting on) in the pivot table. The following code allows me to select the two start and end dates defined in the pivot table filter, but it fails to do two things: a) Remove previously selected values in "End Month-Year" pivot table attribute and b) set "End Month-Year" to select all values between "BegMo & BegYr" and "EndMo & EndYr" My macro looks like this: 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 ..... The good news is I am able to interact with my values in "End Month-Year" by referencing concatenated "BegMo" and "BegYr", so at least that works. Help with this? Thanks, Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Filter lines with Pivot table and non pivot table columns | Charts and Charting in Excel | |||
Filter lines with Pivot table and non Pivot table columns | Excel Discussion (Misc queries) | |||
Filter lines containing pivot table and non pivot table data | Excel Worksheet Functions | |||
Linking parameter query from Access to pivot table in Excel | Excel Discussion (Misc queries) | |||
Pivot Table From Access Parameter Query | Excel Programming |