Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / October 2007

Tip: Looking for answers? Try searching our database.

GetPivotData Reference Range

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kevin Labore - 08 Oct 2007 13:04 GMT
Hi

I am trying to use GetPivotdata to sum the data in a range
The current pivotable displays the data with the weeks as Cols, and
Department/Year as Rows

I can use the following forumla to get the sales for a particular
Week/Dept/year:

=GETPIVOTDATA("DeptSales",DeptSales_Act!$A$3,"Year",$A$5,"Week",$C$4,"DeptDesc",$B26)

What I would like to do is get the last 4 weeks(as well as 8 weeks and 12
weeks) so I can compare/indentify trends

For the 4weeks the reference cols would be C:F
      the 8weeks  the reference cols would be C:J
      the 12weeks  the reference cols would be C:N

Presently to sum last 4 weeks I use a formula like this (not very
practical):

=GETPIVOTDATA("DeptSales",DeptSales_Act!$A$3,"Year",$A$5,"Week",$C$4,"DeptDesc",$B26)+GETPIVOTDATA("DeptSales",DeptSales_Act!$A$3,"Year",$A$5,"Week",$C$4-1,"DeptDesc",$B26)+GETPIVOTDATA("DeptSales",DeptSales_Act!$A$3,"Year",$A$5,"Week",$C$4-2,"DeptDesc",$B26)+GETPIVOTDATA("DeptSales",DeptSales_Act!$A$3,"Year",$A$5,"Week",$C$4-3,"DeptDesc",$B26)

is there a way reference cells this way(sum range?) or do I need to do a
workaround?

thanks

Kevin
Debra Dalgleish - 08 Oct 2007 15:32 GMT
You could create copies of the pivot table, and group the week by 4s, 8s
and 12s.
Each week, manually or programmatically change the start number of the
grouping, to get the ranges that you need.
Then, use GetPivotData formulas to pull results from the grouped data.

> Hi
>
[quoted text clipped - 25 lines]
>
> Kevin

Signature

Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

Kevin Labore - 08 Oct 2007 17:06 GMT
Hi Debra

thanks for the suggestion -- that is a work around I had thought of.
Not a prefferable way to do what I would like to accomplish.
I will try an sum array formula referencing the week # ($c$4)

thanks again for the help

Kevin

> You could create copies of the pivot table, and group the week by 4s, 8s
> and 12s.
[quoted text clipped - 31 lines]
>>
>> Kevin

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.