Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic data in PivotSelect statement
I have a table that changes daily that I am creating a pivot table from.
One day may show Item1 Item2 and Item3, but the next day the source data may only include Item2 and Item3 (no Item1) I would like to assign certain items to a group, but I never know which item will be in the source data for that day. ActiveSheet.PivotTables("PivotTable2").PivotSelect _ "Item["'Item1',"'Item2',"'Item3'"] 'ALL ITEMS'", xlDataAndLabel, True Selection.Group This statement works great if all 3 items are in the source data for today, but if Item2 is missing from the source data, I get an error and the group isn't created. How can I trap for the error and bypass? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic data in PivotSelect statement
No Suggestions?
"mikearelli" wrote: I have a table that changes daily that I am creating a pivot table from. One day may show Item1 Item2 and Item3, but the next day the source data may only include Item2 and Item3 (no Item1) I would like to assign certain items to a group, but I never know which item will be in the source data for that day. ActiveSheet.PivotTables("PivotTable2").PivotSelect _ "Item["'Item1',"'Item2',"'Item3'"] 'ALL ITEMS'", xlDataAndLabel, True Selection.Group This statement works great if all 3 items are in the source data for today, but if Item2 is missing from the source data, I get an error and the group isn't created. How can I trap for the error and bypass? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using PivotSelect method to find the top of a range | Excel Programming | |||
pivot tables: pivotselect with a very large table | Excel Programming | |||
Dynamic Conditional Statement | Excel Programming | |||
PivotSelect | Excel Programming | |||
Pivottable Pivotselect string | Excel Programming |