Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove a Calculated Field from the Pivot Table field list TheTraveler Excel Discussion (Misc queries) 2 April 9th 10 06:55 PM
Creating a Calculated Field in a Pivot Table for same field dza7 Excel Discussion (Misc queries) 3 October 21st 09 11:22 PM
copy field settings of a field to other fields in same pivot tbl new22007 Excel Worksheet Functions 0 May 8th 08 10:22 PM
How to make a field created a part of the Pivot Table Field List? drhell Excel Discussion (Misc queries) 0 January 29th 07 11:13 PM
Unable to change field settings in calculated field in a pivot tab Mike Excel Discussion (Misc queries) 0 September 25th 06 07:45 PM


All times are GMT +1. The time now is 12:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"