Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot row field definition in VBA
How do I write in VBA "I want the 1st row grouping of table X to be the field
name which is shown in cell A1"? Assume that in A1, the name of the field has been selected. I want the user to basically be able to select (outside of the pivot dropdowns) the name of a field (State, Account, Rep) and have that field be the grouping in my pivot. If there is a way to indicate what the second row is also, that would be good (as then I can have them select which order of two different fields they want to see). I know that in this forum it sounds stupid, but for my users, learning how to drag field names into an actual table to force the pivot to react is too hard. So I am trying to work around it with simple dropdowns. Thx for the help. -- Boris |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot row field definition in VBA
Turn on the macro recorder, then create a pivot table similar to what you
want using manual methods. Then turn off the macro recorder. Modify the recorded code to get the value you describe from the sheet. -- Regards, Tom Ogilvy "BorisS" wrote in message ... How do I write in VBA "I want the 1st row grouping of table X to be the field name which is shown in cell A1"? Assume that in A1, the name of the field has been selected. I want the user to basically be able to select (outside of the pivot dropdowns) the name of a field (State, Account, Rep) and have that field be the grouping in my pivot. If there is a way to indicate what the second row is also, that would be good (as then I can have them select which order of two different fields they want to see). I know that in this forum it sounds stupid, but for my users, learning how to drag field names into an actual table to force the pivot to react is too hard. So I am trying to work around it with simple dropdowns. Thx for the help. -- Boris |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot row field definition in VBA
unfortunately, the logic flow when I record it is to put the field I indicate
into position 1. However, what I need is to then take position 2 (whatever it is) and make it not exist anymore (effectively drag the field out of the table). However, since this is a dynamic table, I don't know how to say take "y" field, which is in position 2, and drag it out. When I record it, the macro literally says "make y field invisible (knowing the name of y field)". I need it to say "whatever position 2 is, make it invisible (hide). Any help on how to do this? -- Boris "Tom Ogilvy" wrote: Turn on the macro recorder, then create a pivot table similar to what you want using manual methods. Then turn off the macro recorder. Modify the recorded code to get the value you describe from the sheet. -- Regards, Tom Ogilvy "BorisS" wrote in message ... How do I write in VBA "I want the 1st row grouping of table X to be the field name which is shown in cell A1"? Assume that in A1, the name of the field has been selected. I want the user to basically be able to select (outside of the pivot dropdowns) the name of a field (State, Account, Rep) and have that field be the grouping in my pivot. If there is a way to indicate what the second row is also, that would be good (as then I can have them select which order of two different fields they want to see). I know that in this forum it sounds stupid, but for my users, learning how to drag field names into an actual table to force the pivot to react is too hard. So I am trying to work around it with simple dropdowns. Thx for the help. -- Boris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I remove a Calculated Field from the Pivot Table field list | Excel Discussion (Misc queries) | |||
Creating a Calculated Field in a Pivot Table for same field | Excel Discussion (Misc queries) | |||
copy field settings of a field to other fields in same pivot tbl | Excel Worksheet Functions | |||
How to make a field created a part of the Pivot Table Field List? | Excel Discussion (Misc queries) | |||
Unable to change field settings in calculated field in a pivot tab | Excel Discussion (Misc queries) |