Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Macro to update Pivot Table

Hi

The name Total refers to a dynamic range, and I use it to make/update
my Pivot Table.

Each month Total expands with one column, and in order to update the
Pivot Table I've to choose
a) PivotTable, Refresh Data
b) PivotTable, Wizard..., Finished - and then add the new column
c) Then add the new column

Is there a way to make a macro that allways reflect the dynamic range
Total for all changes made, and that always sum up the values instead
of count function?

Paul
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Macro to update Pivot Table

You can define a dynamic range that expands to include new columns and
new rows. For example:

=OFFSET(Data!$A$1,0,0,COUNTA(Data!$A:$A),COUNTA(Da ta!$1:$1))

would count the cells used in column A and in row 1, and include those
in the Total range. Use Total as the source for the Pivot Table.

The Count function is the default if there are blank cells in the field,
otherwise Sum is the default function.

Paul wrote:
Hi

The name Total refers to a dynamic range, and I use it to make/update
my Pivot Table.

Each month Total expands with one column, and in order to update the
Pivot Table I've to choose
a) PivotTable, Refresh Data
b) PivotTable, Wizard..., Finished - and then add the new column
c) Then add the new column

Is there a way to make a macro that allways reflect the dynamic range
Total for all changes made, and that always sum up the values instead
of count function?

Paul



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Macro to update Pivot Table

Thx for your reply Debra,

but my problem was not hot to define a dynamic range, but how to
update the PivotTable each time the dynamic range expand by columns.
By now I have to do this manually from PivotTable toolbars:

a) PivotTable, Refresh Data
b) PivotTable, Wizard..., Finished
c) Then add the new column

I'm looking for a macro that could do this automatically.

Paul


Debra Dalgleish wrote in message ...
You can define a dynamic range that expands to include new columns and
new rows. For example:

=OFFSET(Data!$A$1,0,0,COUNTA(Data!$A:$A),COUNTA(Da ta!$1:$1))

would count the cells used in column A and in row 1, and include those
in the Total range. Use Total as the source for the Pivot Table.

The Count function is the default if there are blank cells in the field,
otherwise Sum is the default function.

Paul wrote:
Hi

The name Total refers to a dynamic range, and I use it to make/update
my Pivot Table.

Each month Total expands with one column, and in order to update the
Pivot Table I've to choose
a) PivotTable, Refresh Data
b) PivotTable, Wizard..., Finished - and then add the new column
c) Then add the new column

Is there a way to make a macro that allways reflect the dynamic range
Total for all changes made, and that always sum up the values instead
of count function?

Paul

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 Update Dale Excel Discussion (Misc queries) 6 October 25th 09 09:00 PM
Pivot Table Update Lambi000 Excel Discussion (Misc queries) 1 January 30th 08 08:08 PM
record a macro to update pivot table louiscourtney Excel Discussion (Misc queries) 1 July 21st 07 04:50 AM
Pivot Table update Talheedin Excel Discussion (Misc queries) 0 August 23rd 06 11:05 AM
Give File Time to update Pivot Table when started bij Macro Jasper Excel Discussion (Misc queries) 0 April 27th 05 01:30 PM


All times are GMT +1. The time now is 02: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"