Is it possible to put cell references inside an array that is being used with in a GetPivotData formula, encapsulated by a SUM?
For example, this formula works
=SUM(GETPIVOTDATA("loss_pct",Pres3_Pivot!$A$1,"typeOfLiquidation",{"REO Sale","Short Sale"},"liquidationMonth",E$6))
It take the sum of the GetPivotData result for the "typeofLiquidation" values "REO Sale" and "Short Sale"
This formula does not work:
=SUM(GETPIVOTDATA("loss_pct",Pres3_Pivot!$A$1,"typeOfLiquidation",{D23,D24},"liquidationMonth",E$6))
This attempts the same result, but with cell references at 'D23' and 'D24.' Attempting to enter this formula is met with an application error telling me the formula I typed contains an error.
This also does not work, but this time at least I get a reference error:
=SUM(GETPIVOTDATA("loss_pct",Pres3_Pivot!$A$1,"typeOfLiquidation",INDIRECT({"D23","D24"}),"liquidationMonth",E$6))
Does anyone have a suggestion? Is such a reference inside the array possible?
So I found a solution.
This formula works (entered as an array [Ctrl+Shft+Enter]):
=SUM(GETPIVOTDATA("loss_pct",Pres3_Pivot!$A$1,"typeOfLiquidation",U23:U24,"liquidationMonth",E$6))
The key was referencing cells U23:U24 where I can transformed the actual references (D23:D24) into Text(). This was a requirement for the GetPivotData to work even without the sum and the array component.
Entered as an array formula (Ctrl+Shft+Enter), it works. Thanks pnuts!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.