Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help !!! Pivot Change with Parametric data


Hi !!!
I have a very big problem !!!

every month i have to refresh my pivot (Pivot_C_1) deleting th
previous month & adding a new month (the number of months are always
since the current month).

The pivot get the data from an Access database and i have group month
by quarter & year using cubefields.
The data start from december 2003 to december 2005

every month i register the operation with a new manual macro but now
want to grow-up and so i need a hand to automate this operation with
new parametric macro but, aaargh !!! really i don't understand how
have to modify the code.
I would like to put in a xl sheet which year,quarter & month (a rang
with 3 columns for 7 rows/months) & then i want to pass these values t
a vba macro that change the pivot.

Can anybody help me ?
Thank you in advance



Sub Change_Month()


ActiveSheet.PivotTables("Pivot_C_1").CubeFields(3) .TreeviewControl.Drille
= _
Array(Array("", "", ""), Array("[Data].[All Data].[2004]", _
"[Data].[All Data].[2005]", ""), Array("[Data].[Al
Data].[2004].[Quarter 4]", _
"[Data].[All Data].[2005].[Quarter 1]", "[Data].[Al
Data].[2005].[Quarter 2]"))
ActiveSheet.PivotTables("Pivot_C_1").PivotFields("[Data].[Year]")
_
HiddenItemsList = Array("[Data].[All Data].[2002]"
"[Data].[All Data].[2003]")

ActiveSheet.PivotTables("Pivot_C_1").PivotFields("[Data].[Quarter]")
_
HiddenItemsList = Array("[Data].[All Data].[2003].[Quarter 2]"
_
"[Data].[All Data].[2003].[Quarter 1]", "[Data].[Al
Data].[2003].[Quarter 3]", _
"[Data].[All Data].[2004].[Quarter 1]", "[Data].[Al
Data].[2005].[Quarter 3]", _
"[Data].[All Data].[2005].[Quarter 4]", "[Data].[Al
Data].[2004].[Quarter 2]", _
"[Data].[All Data].[2004].[Quarter 3]")
ActiveSheet.PivotTables("Pivot_C_1").PivotFields("[Data].[Month]")
_
HiddenItemsList = Array("[Data].[All Data].[2003].[Quarte
3].[July]", _
"[Data].[All Data].[2003].[Quarter 3].[August]", _
"[Data].[All Data].[2003].[Quarter 4].[October]", _
"[Data].[All Data].[2003].[Quarter 4].[November]", _
"[Data].[All Data].[2004].[Quarter 1].[January]", _
"[Data].[All Data].[2004].[Quarter 1].[February]", _
"[Data].[All Data].[2004].[Quarter 2].[April]", _
"[Data].[All Data].[2004].[Quarter 2].[May]", _
"[Data].[All Data].[2004].[Quarter 3].[July]", _
"[Data].[All Data].[2005].[Quarter 2].[June]", _
"[Data].[All Data].[2004].[Quarter 3].[August]")
End Sub

:confused

--
Superciu
-----------------------------------------------------------------------
Superciuk's Profile: http://www.excelforum.com/member.php...fo&userid=1502
View this thread: http://www.excelforum.com/showthread.php?threadid=26647

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
Can't change Pivot Table data source AABob Excel Worksheet Functions 1 January 30th 09 07:07 PM
can i change pivot table to change data jacob22 Excel Discussion (Misc queries) 2 April 11th 07 03:32 PM
Non parametric tests rakbhat Excel Discussion (Misc queries) 0 September 27th 06 04:38 PM
How do you graph parametric equations in Excel? Velocity Excel Discussion (Misc queries) 0 April 11th 06 07:25 PM
Change Data In Pivot Table John Calder New Users to Excel 1 July 7th 05 10:41 PM


All times are GMT +1. The time now is 01:15 PM.

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"