Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default GetPivotData Multiple Fields

Morning guys.

I have a pivot table which looks like this...

COST CENTRE
NUMBER VET IT OTHER

7800 750.00 100.00 76.00


In order for me to obtain the sum of the VET and IT cost centre amounts only
for the account code 7800 i am currently using the following formula:

=GETPIVOTDATA("Sum Of
GoodsValueInBase",'PivotTab'!$A$3,"Number","7800", "CostCentre","VET") +
GETPIVOTDATA("Sum Of
GoodsValueInBase",'PivotTab'!$A$3,"Number","7800", "CostCentre","IT")

So basically i am picking off the two entries from the pivot table
seperately and adding them together.
Is there any way i can use the getpivotdata function to look up them both
and add them together (the formula bar runs out of room if i am using too
many accountnumbers and cost centres, so i am looking for a shorter formula)

Something like
=GETPIVOTDATA("Sum Of
GoodsValueInBase",'PivotTab'!$A$3,"AccountNumber", "7800","AccountCostCentre","VET" & "AccountCostCentre", "IT")


Thanks in advance
Bazy2k

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default GetPivotData Multiple Fields

Hi

That can't be done with GetPivotData.
You will need to add the various elements together.
However, you can cut down the size of the formula by using Index and a named
range instead.

In my case the PT was on Sheet 4, with the PT in columns A:D.
I used Column I to contain the Costcentre required.
Adjust the following to suit your layout.

InsertNameDefineName Row Refers to
=MATCH(Sheet4!$I1,Sheet4!$A:$A,0)

In cell J2 enter
=IF(ISNA(Row),"",INDEX(B:B,row)+INDEX(C:C,row))

Just keep adding the extra columns as required
--
Regards
Roger Govier

"Bazy2k" wrote in message
...
Morning guys.

I have a pivot table which looks like this...

COST CENTRE
NUMBER VET IT OTHER

7800 750.00 100.00 76.00


In order for me to obtain the sum of the VET and IT cost centre amounts
only
for the account code 7800 i am currently using the following formula:

=GETPIVOTDATA("Sum Of
GoodsValueInBase",'PivotTab'!$A$3,"Number","7800", "CostCentre","VET") +
GETPIVOTDATA("Sum Of
GoodsValueInBase",'PivotTab'!$A$3,"Number","7800", "CostCentre","IT")

So basically i am picking off the two entries from the pivot table
seperately and adding them together.
Is there any way i can use the getpivotdata function to look up them both
and add them together (the formula bar runs out of room if i am using too
many accountnumbers and cost centres, so i am looking for a shorter
formula)

Something like
=GETPIVOTDATA("Sum Of
GoodsValueInBase",'PivotTab'!$A$3,"AccountNumber", "7800","AccountCostCentre","VET"
& "AccountCostCentre", "IT")


Thanks in advance
Bazy2k

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,180
Default GetPivotData Multiple Fields

Excel 2007 Pivot Table
Several more methods.
http://www.mediafire.com/file/twngjmxmoy4/05_14_09.xlsx

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default GetPivotData Multiple Fields

Thanks guys for both your help, i took the easy option in the end, simply
retrieved the data for the two cost centres seperately and then just added
them together on my spreadsheet, think i was trying to be too clever about it!

Thanks again!

"Roger Govier" wrote:

Hi

That can't be done with GetPivotData.
You will need to add the various elements together.
However, you can cut down the size of the formula by using Index and a named
range instead.

In my case the PT was on Sheet 4, with the PT in columns A:D.
I used Column I to contain the Costcentre required.
Adjust the following to suit your layout.

InsertNameDefineName Row Refers to
=MATCH(Sheet4!$I1,Sheet4!$A:$A,0)

In cell J2 enter
=IF(ISNA(Row),"",INDEX(B:B,row)+INDEX(C:C,row))

Just keep adding the extra columns as required
--
Regards
Roger Govier

"Bazy2k" wrote in message
...
Morning guys.

I have a pivot table which looks like this...

COST CENTRE
NUMBER VET IT OTHER

7800 750.00 100.00 76.00


In order for me to obtain the sum of the VET and IT cost centre amounts
only
for the account code 7800 i am currently using the following formula:

=GETPIVOTDATA("Sum Of
GoodsValueInBase",'PivotTab'!$A$3,"Number","7800", "CostCentre","VET") +
GETPIVOTDATA("Sum Of
GoodsValueInBase",'PivotTab'!$A$3,"Number","7800", "CostCentre","IT")

So basically i am picking off the two entries from the pivot table
seperately and adding them together.
Is there any way i can use the getpivotdata function to look up them both
and add them together (the formula bar runs out of room if i am using too
many accountnumbers and cost centres, so i am looking for a shorter
formula)

Something like
=GETPIVOTDATA("Sum Of
GoodsValueInBase",'PivotTab'!$A$3,"AccountNumber", "7800","AccountCostCentre","VET"
& "AccountCostCentre", "IT")


Thanks in advance
Bazy2k

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
Multiple Fields In Multiple Ranged Pivot Table FARAZ QURESHI Excel Discussion (Misc queries) 0 September 19th 07 07:08 AM
Multiple Cell References in GetPivotData Sarah (OGI) Excel Worksheet Functions 4 May 18th 07 05:42 PM
how do I add multiple fields together? aharrell Excel Worksheet Functions 1 September 1st 06 04:05 PM
GetPivotData for hidden fields RonB Excel Discussion (Misc queries) 6 July 14th 06 02:15 AM
getpivotdata having multiple items RoboStat Excel Discussion (Misc queries) 1 May 10th 06 03:15 AM


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