Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default programmatic grouping of columns in pivot table

I've built a pivot table programmatically in VB.net using the Excel OM . The
columns of the table are Jan, Feb, Mar, etc. and I would like to group them
programmatically into Quarters also but can't figure out what the code should
be. I'd also like to have subtotals for the Quarters. Can someone provide the
code for this or point me to something that would help?

Thanks,

Jerry
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default programmatic grouping of columns in pivot table

Are your dates just the months, or are they actual dates? If they are actual
dates then you just need to change your grouping to include, Quarters and
Years... Teh Pivot Table engine changed in xl2002, so any code would have to
be written for your version of Excel. You could just record a macro if you
have actual dates. If you do not have actual dates then you are going to have
to do some programming to add a dimension (column) to your source data with
indicates the quarter, based on the month.
--
HTH...

Jim Thomlinson


"Jerry" wrote:

I've built a pivot table programmatically in VB.net using the Excel OM . The
columns of the table are Jan, Feb, Mar, etc. and I would like to group them
programmatically into Quarters also but can't figure out what the code should
be. I'd also like to have subtotals for the Quarters. Can someone provide the
code for this or point me to something that would help?

Thanks,

Jerry

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default programmatic grouping of columns in pivot table



"Jim Thomlinson" wrote:

Are your dates just the months, or are they actual dates? If they are actual
dates then you just need to change your grouping to include, Quarters and
Years... Teh Pivot Table engine changed in xl2002, so any code would have to
be written for your version of Excel. You could just record a macro if you
have actual dates. If you do not have actual dates then you are going to have
to do some programming to add a dimension (column) to your source data with
indicates the quarter, based on the month.
--
HTH...

Jim Thomlinson


"Jerry" wrote:

I've built a pivot table programmatically in VB.net using the Excel OM . The
columns of the table are Jan, Feb, Mar, etc. and I would like to group them
programmatically into Quarters also but can't figure out what the code should
be. I'd also like to have subtotals for the Quarters. Can someone provide the
code for this or point me to something that would help?

Thanks,

Jerry


Jim,

The columns are just month abbreviations. If I grouping manually in a pivot
table I can group by months, quarters and even get subtotals by quarters.
I've tried recording a macro for these clicks but the code I get from the
macro just doesn't seem to work in VB.net. I was hoping you might have some
code that actually does grouping of columns. Any help would be appreciated.

I could format the columns for something like 1/31/06, 2/28/06 ... If I did
that I still don't know how to program the gouping. Can you help with that?
I'm using Excel 2003 and VB.net (Visual Studio 2005)

Thanks,
jerry

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default programmatic grouping of columns in pivot table

My .net is thin and I only have xl2k here at work, so I will not be a lot of
help with code. Debra Dagliesh has an excellent site on pivot table
programming...

http://www.contextures.com/

She is the Guru in this area.
--
HTH...

Jim Thomlinson


"Jerry" wrote:



"Jim Thomlinson" wrote:

Are your dates just the months, or are they actual dates? If they are actual
dates then you just need to change your grouping to include, Quarters and
Years... Teh Pivot Table engine changed in xl2002, so any code would have to
be written for your version of Excel. You could just record a macro if you
have actual dates. If you do not have actual dates then you are going to have
to do some programming to add a dimension (column) to your source data with
indicates the quarter, based on the month.
--
HTH...

Jim Thomlinson


"Jerry" wrote:

I've built a pivot table programmatically in VB.net using the Excel OM . The
columns of the table are Jan, Feb, Mar, etc. and I would like to group them
programmatically into Quarters also but can't figure out what the code should
be. I'd also like to have subtotals for the Quarters. Can someone provide the
code for this or point me to something that would help?

Thanks,

Jerry


Jim,

The columns are just month abbreviations. If I grouping manually in a pivot
table I can group by months, quarters and even get subtotals by quarters.
I've tried recording a macro for these clicks but the code I get from the
macro just doesn't seem to work in VB.net. I was hoping you might have some
code that actually does grouping of columns. Any help would be appreciated.

I could format the columns for something like 1/31/06, 2/28/06 ... If I did
that I still don't know how to program the gouping. Can you help with that?
I'm using Excel 2003 and VB.net (Visual Studio 2005)

Thanks,
jerry

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default programmatic grouping of columns in pivot table



"Jim Thomlinson" wrote:

My .net is thin and I only have xl2k here at work, so I will not be a lot of
help with code. Debra Dagliesh has an excellent site on pivot table
programming...

http://www.contextures.com/

She is the Guru in this area.
--
HTH...

Jim Thomlinson


"Jerry" wrote:



"Jim Thomlinson" wrote:

Are your dates just the months, or are they actual dates? If they are actual
dates then you just need to change your grouping to include, Quarters and
Years... Teh Pivot Table engine changed in xl2002, so any code would have to
be written for your version of Excel. You could just record a macro if you
have actual dates. If you do not have actual dates then you are going to have
to do some programming to add a dimension (column) to your source data with
indicates the quarter, based on the month.
--
HTH...

Jim Thomlinson


"Jerry" wrote:

I've built a pivot table programmatically in VB.net using the Excel OM . The
columns of the table are Jan, Feb, Mar, etc. and I would like to group them
programmatically into Quarters also but can't figure out what the code should
be. I'd also like to have subtotals for the Quarters. Can someone provide the
code for this or point me to something that would help?

Thanks,

Jerry


Jim,

The columns are just month abbreviations. If I grouping manually in a pivot
table I can group by months, quarters and even get subtotals by quarters.
I've tried recording a macro for these clicks but the code I get from the
macro just doesn't seem to work in VB.net. I was hoping you might have some
code that actually does grouping of columns. Any help would be appreciated.

I could format the columns for something like 1/31/06, 2/28/06 ... If I did
that I still don't know how to program the gouping. Can you help with that?
I'm using Excel 2003 and VB.net (Visual Studio 2005)

Thanks,
jerry


Okay, thanks...

jerry



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
Pivot Table Grouping Carol Chan Excel Discussion (Misc queries) 2 November 27th 16 02:36 AM
Grouping with a pivot table ROland Excel Worksheet Functions 1 November 3rd 06 06:35 PM
Grouping data in pivot table columns ConnieMS Excel Discussion (Misc queries) 4 July 17th 06 05:16 PM
Pivot Table Grouping Mike Waldron[_2_] Excel Programming 0 April 26th 04 10:18 PM
Grouping in a Pivot Table Shailesh Shah[_2_] Excel Programming 0 July 29th 03 01:40 PM


All times are GMT +1. The time now is 09:25 AM.

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

About Us

"It's about Microsoft Excel"