G
Guest
Hi,
I have two adjacent columns, occuping Column C and D (range C15100), in my
summary sheet. The user selects values from a drop-down list in both columns,
with one OR the other value in a pair being selected (and the other remaining
blank).
I would like to dynamically generate pivot tables based on data from my
"PivotData" sheet, according to a pre-arranged PT format, with either the
value in Column C OR Column D forming the Pivot table page filter.
Essentially I'd like a macro to create new worksheets, each with a new pivot
table using a page filter from one or the other value of user-chosen,
drop-down values in Column C or D.
Perhaps once the user has selected values in Column C and D (e.g. for row
15, either C15 or D15 is filled with data using a data validation function),
a macro will parse these values in separate worksheets and a pivot table is
generated using this values in Columns C and D as page filters.
I already have a pivot table designed, and I know that I could turn on the
macro recorder and use this code when dynamically generating all the pivot
tables. I could then refine this recorded macro to be more efficient (i.e.
using knowledge gained from John Walkenbach's Power Programming with VBA
book). I just need the VBA code that will do the parsing of these values.
What would be my best route to solve this problem?
Thanks in advance,
I have two adjacent columns, occuping Column C and D (range C15100), in my
summary sheet. The user selects values from a drop-down list in both columns,
with one OR the other value in a pair being selected (and the other remaining
blank).
I would like to dynamically generate pivot tables based on data from my
"PivotData" sheet, according to a pre-arranged PT format, with either the
value in Column C OR Column D forming the Pivot table page filter.
Essentially I'd like a macro to create new worksheets, each with a new pivot
table using a page filter from one or the other value of user-chosen,
drop-down values in Column C or D.
Perhaps once the user has selected values in Column C and D (e.g. for row
15, either C15 or D15 is filled with data using a data validation function),
a macro will parse these values in separate worksheets and a pivot table is
generated using this values in Columns C and D as page filters.
I already have a pivot table designed, and I know that I could turn on the
macro recorder and use this code when dynamically generating all the pivot
tables. I could then refine this recorded macro to be more efficient (i.e.
using knowledge gained from John Walkenbach's Power Programming with VBA
book). I just need the VBA code that will do the parsing of these values.
What would be my best route to solve this problem?
Thanks in advance,