bkjohn2016
New Member
- Joined
- Sep 9, 2016
- Messages
- 38
Is it possible to reference another cell to use as an array constant?
Let's say in table A I have the following data:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Type Code[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]5[/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]
And I'd like the the amount aggregated by the type code in table B:
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]Type Desc[/TD]
[TD]Type Code[/TD]
[TD]Amt[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]A[/TD]
[TD]1[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]B[/TD]
[TD]2[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]C[/TD]
[TD]1,2[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]D[/TD]
[TD]5[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]E[/TD]
[TD]4[/TD]
[TD]40[/TD]
[/TR]
</tbody>[/TABLE]
I use the following formulation to get the aggregations in column C of table B:
And for C13 I can use the following to get the desired result of 30:
Is it possible to create a formulation that would use cell B13 to create a dynamic array constant?
Let's say in table A I have the following data:
[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Type Code[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]5[/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]
And I'd like the the amount aggregated by the type code in table B:
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]Type Desc[/TD]
[TD]Type Code[/TD]
[TD]Amt[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]A[/TD]
[TD]1[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]B[/TD]
[TD]2[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]C[/TD]
[TD]1,2[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]D[/TD]
[TD]5[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]E[/TD]
[TD]4[/TD]
[TD]40[/TD]
[/TR]
</tbody>[/TABLE]
I use the following formulation to get the aggregations in column C of table B:
Code:
=SUMPRODUCT(--(A$1:$A$6=$B11),
$B$2:$B$6)
And for C13 I can use the following to get the desired result of 30:
Code:
=SUMPRODUCT(--($A1:$A$6={1,2})*
$B$1:$B$6)
Is it possible to create a formulation that would use cell B13 to create a dynamic array constant?