Hello All,
I have this amount of imaginary cash in my imaginary accounts (geeky points for guessing the reason behind the names):
[TABLE="width: 187"]
<tbody>[TR]
[TD="width: 29, bgcolor: transparent"][/TD]
[TD="width: 85, bgcolor: transparent"][/TD]
[TD="width: 65, bgcolor: transparent"][/TD]
[TD="width: 70, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"][/TD]
[TD="width: 85, bgcolor: transparent"]AccountRef[/TD]
[TD="width: 65, bgcolor: transparent"]Amount[/TD]
[TD="width: 70, bgcolor: transparent"]Currency[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"][/TD]
[TD="width: 85, bgcolor: transparent"]ALFA145[/TD]
[TD="width: 65, bgcolor: transparent"][/TD]
[TD="width: 70, bgcolor: transparent"]USD[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"][/TD]
[TD="width: 85, bgcolor: transparent"]ALFA155[/TD]
[TD="width: 65, bgcolor: transparent"][/TD]
[TD="width: 70, bgcolor: transparent"]USD
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"][/TD]
[TD="width: 85, bgcolor: transparent"]ALFA75[/TD]
[TD="width: 65, bgcolor: transparent"][/TD]
[TD="width: 70, bgcolor: transparent"]EUR[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"][/TD]
[TD="width: 85, bgcolor: transparent"]ALFA90[/TD]
[TD="width: 65, bgcolor: transparent"][/TD]
[TD="width: 70, bgcolor: transparent"]JPY
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"][/TD]
[TD="width: 85, bgcolor: transparent"]ALFA146[/TD]
[TD="width: 65, bgcolor: transparent"][/TD]
[TD="width: 70, bgcolor: transparent"]USD[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"][/TD]
[TD="width: 85, bgcolor: transparent"]ALFA164[/TD]
[TD="width: 65, bgcolor: transparent"][/TD]
[TD="width: 70, bgcolor: transparent"]CHF[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"][/TD]
[TD="width: 85, bgcolor: transparent"]ALFA145[/TD]
[TD="width: 65, bgcolor: transparent"][/TD]
[TD="width: 70, bgcolor: transparent"]USD[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"][/TD]
[TD="width: 85, bgcolor: transparent"]ALFA75[/TD]
[TD="width: 65, bgcolor: transparent"][/TD]
[TD="width: 70, bgcolor: transparent"]EUR[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"][/TD]
[TD="width: 85, bgcolor: transparent"]ALFA164[/TD]
[TD="width: 65, bgcolor: transparent"][/TD]
[TD="width: 70, bgcolor: transparent"]EUR[/TD]
[/TR]
</tbody>[/TABLE]
I then make a summary table by account/currency
[TABLE="width: 457"]
<tbody>[TR]
[TD="width: 48, bgcolor: transparent"][/TD]
[TD="width: 115, bgcolor: transparent"]E[/TD]
[TD="width: 64, bgcolor: transparent"]F[/TD]
[TD="width: 64, bgcolor: transparent"]G[/TD]
[TD="width: 64, bgcolor: transparent"]H[/TD]
[TD="width: 64, bgcolor: transparent"]I[/TD]
[TD="width: 64, bgcolor: transparent"]J[/TD]
[TD="width: 64, bgcolor: transparent"]K[/TD]
[TD="width: 64, bgcolor: transparent"]L
[/TD]
[/TR]
[TR]
[TD="width: 48, bgcolor: transparent"]1[/TD]
[TD="width: 115, bgcolor: transparent"]TOTAL BALANCES[/TD]
[TD="width: 64, bgcolor: transparent"]ALFA145[/TD]
[TD="width: 64, bgcolor: transparent"]ALFA155[/TD]
[TD="width: 64, bgcolor: transparent"]ALFA75[/TD]
[TD="width: 64, bgcolor: transparent"]ALFA90[/TD]
[TD="width: 64, bgcolor: transparent"]ALFA146[/TD]
[TD="width: 64, bgcolor: transparent"]ALFA164[/TD]
[TD="width: 64, bgcolor: transparent"]TOTAL[/TD]
[/TR]
[TR]
[TD="width: 48, bgcolor: transparent"]2[/TD]
[TD="width: 115, bgcolor: transparent"]USD[/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 48, bgcolor: transparent"]3[/TD]
[TD="width: 115, bgcolor: transparent"]EUR[/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 48, bgcolor: transparent"]4[/TD]
[TD="width: 115, bgcolor: transparent"]JPY[/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 48, bgcolor: transparent"]5[/TD]
[TD="width: 115, bgcolor: transparent"]CHF[/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
The formulat in F2 is =SUMPRODUCT($B$2:$B$10;1*($C$2:$C$10=$E2);1*($A$2:$A$10=F$1))
However, since ALFA145 and ALFA146 are related, I would like to add these two accounts together. I know in sumproduct I can add a --(ISNUMBER(MATCH($A$2:$A$10; {"ALFA145,ALFA146"};0)).
The question is: is there a way of populating the {"ALFA145,ALFA145"} automatically. What I would really like is a way of automatically generating the vector based on the headers? I.e, I want to get to this result:
[TABLE="width: 105"]
<tbody>[TR]
[TD="width: 9%, bgcolor: transparent"][/TD]
[TD="width: 17%, bgcolor: transparent"]E[/TD]
[TD="width: 20%, bgcolor: transparent"]F[/TD]
[TD="width: 13%, bgcolor: transparent"]G[/TD]
[TD="width: 14%, bgcolor: transparent"]H[/TD]
[TD="width: 10%, bgcolor: transparent"]I[/TD]
[TD="width: 14%, bgcolor: transparent"]J[/TD]
[/TR]
[TR]
[TD="width: 9%, bgcolor: transparent"]1[/TD]
[TD="width: 17%, bgcolor: transparent"]TOTAL BALANCES[/TD]
[TD="width: 20%, bgcolor: transparent"]ALFA145,ALFA146[/TD]
[TD="width: 13%, bgcolor: transparent"]ALFA155[/TD]
[TD="width: 14%, bgcolor: transparent"]ALFA75[/TD]
[TD="width: 10%, bgcolor: transparent"]ALFA90[/TD]
[TD="width: 14%, bgcolor: transparent"]ALFA164[/TD]
[/TR]
[TR]
[TD="width: 9%, bgcolor: transparent"]2[/TD]
[TD="width: 17%, bgcolor: transparent"]USD[/TD]
[TD="width: 20%, bgcolor: transparent"][/TD]
[TD="width: 13%, bgcolor: transparent"][/TD]
[TD="width: 14%, bgcolor: transparent"][/TD]
[TD="width: 10%, bgcolor: transparent"][/TD]
[TD="width: 14%, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 9%, bgcolor: transparent"]3[/TD]
[TD="width: 17%, bgcolor: transparent"]EUR[/TD]
[TD="width: 20%, bgcolor: transparent"][/TD]
[TD="width: 13%, bgcolor: transparent"][/TD]
[TD="width: 14%, bgcolor: transparent"][/TD]
[TD="width: 10%, bgcolor: transparent"][/TD]
[TD="width: 14%, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 9%, bgcolor: transparent"]4[/TD]
[TD="width: 17%, bgcolor: transparent"]JPY[/TD]
[TD="width: 20%, bgcolor: transparent"][/TD]
[TD="width: 13%, bgcolor: transparent"][/TD]
[TD="width: 14%, bgcolor: transparent"][/TD]
[TD="width: 10%, bgcolor: transparent"][/TD]
[TD="width: 14%, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 9%, bgcolor: transparent"]5[/TD]
[TD="width: 17%, bgcolor: transparent"]CHF[/TD]
[TD="width: 20%, bgcolor: transparent"][/TD]
[TD="width: 13%, bgcolor: transparent"][/TD]
[TD="width: 14%, bgcolor: transparent"][/TD]
[TD="width: 10%, bgcolor: transparent"][/TD]
[TD="width: 14%, bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
This way I can add accounts (say I wanto to sum ALFA90 and ALFA75 as they are related) by using "," separators and the formula will just get updated. This will also allow me to have multiple accounts easier than dedicating several cells.
I have this amount of imaginary cash in my imaginary accounts (geeky points for guessing the reason behind the names):
[TABLE="width: 187"]
<tbody>[TR]
[TD="width: 29, bgcolor: transparent"][/TD]
[TD="width: 85, bgcolor: transparent"]
A
[TD="width: 65, bgcolor: transparent"]
B
[TD="width: 70, bgcolor: transparent"]
C
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
1
[TD="width: 85, bgcolor: transparent"]AccountRef[/TD]
[TD="width: 65, bgcolor: transparent"]Amount[/TD]
[TD="width: 70, bgcolor: transparent"]Currency[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
2
[TD="width: 85, bgcolor: transparent"]ALFA145[/TD]
[TD="width: 65, bgcolor: transparent"]
100
[TD="width: 70, bgcolor: transparent"]USD[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
3
[TD="width: 85, bgcolor: transparent"]ALFA155[/TD]
[TD="width: 65, bgcolor: transparent"]
70
[TD="width: 70, bgcolor: transparent"]USD
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
4
[TD="width: 85, bgcolor: transparent"]ALFA75[/TD]
[TD="width: 65, bgcolor: transparent"]
30
[TD="width: 70, bgcolor: transparent"]EUR[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
5
[TD="width: 85, bgcolor: transparent"]ALFA90[/TD]
[TD="width: 65, bgcolor: transparent"]
150
[TD="width: 70, bgcolor: transparent"]JPY
[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
6
[TD="width: 85, bgcolor: transparent"]ALFA146[/TD]
[TD="width: 65, bgcolor: transparent"]
50
[TD="width: 70, bgcolor: transparent"]USD[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
7
[TD="width: 85, bgcolor: transparent"]ALFA164[/TD]
[TD="width: 65, bgcolor: transparent"]
10
[TD="width: 70, bgcolor: transparent"]CHF[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
8
[TD="width: 85, bgcolor: transparent"]ALFA145[/TD]
[TD="width: 65, bgcolor: transparent"]
250
[TD="width: 70, bgcolor: transparent"]USD[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
9
[TD="width: 85, bgcolor: transparent"]ALFA75[/TD]
[TD="width: 65, bgcolor: transparent"]
90
[TD="width: 70, bgcolor: transparent"]EUR[/TD]
[/TR]
[TR]
[TD="width: 29, bgcolor: transparent"]
10
[TD="width: 85, bgcolor: transparent"]ALFA164[/TD]
[TD="width: 65, bgcolor: transparent"]
90
[TD="width: 70, bgcolor: transparent"]EUR[/TD]
[/TR]
</tbody>[/TABLE]
I then make a summary table by account/currency
[TABLE="width: 457"]
<tbody>[TR]
[TD="width: 48, bgcolor: transparent"][/TD]
[TD="width: 115, bgcolor: transparent"]E[/TD]
[TD="width: 64, bgcolor: transparent"]F[/TD]
[TD="width: 64, bgcolor: transparent"]G[/TD]
[TD="width: 64, bgcolor: transparent"]H[/TD]
[TD="width: 64, bgcolor: transparent"]I[/TD]
[TD="width: 64, bgcolor: transparent"]J[/TD]
[TD="width: 64, bgcolor: transparent"]K[/TD]
[TD="width: 64, bgcolor: transparent"]L
[/TD]
[/TR]
[TR]
[TD="width: 48, bgcolor: transparent"]1[/TD]
[TD="width: 115, bgcolor: transparent"]TOTAL BALANCES[/TD]
[TD="width: 64, bgcolor: transparent"]ALFA145[/TD]
[TD="width: 64, bgcolor: transparent"]ALFA155[/TD]
[TD="width: 64, bgcolor: transparent"]ALFA75[/TD]
[TD="width: 64, bgcolor: transparent"]ALFA90[/TD]
[TD="width: 64, bgcolor: transparent"]ALFA146[/TD]
[TD="width: 64, bgcolor: transparent"]ALFA164[/TD]
[TD="width: 64, bgcolor: transparent"]TOTAL[/TD]
[/TR]
[TR]
[TD="width: 48, bgcolor: transparent"]2[/TD]
[TD="width: 115, bgcolor: transparent"]USD[/TD]
[TD="width: 64, bgcolor: transparent"]
350
[TD="width: 64, bgcolor: transparent"]
70
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
50
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
470
[/TR]
[TR]
[TD="width: 48, bgcolor: transparent"]3[/TD]
[TD="width: 115, bgcolor: transparent"]EUR[/TD]
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
120
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
90
[TD="width: 64, bgcolor: transparent"]
210
[/TR]
[TR]
[TD="width: 48, bgcolor: transparent"]4[/TD]
[TD="width: 115, bgcolor: transparent"]JPY[/TD]
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
150
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
150
[/TR]
[TR]
[TD="width: 48, bgcolor: transparent"]5[/TD]
[TD="width: 115, bgcolor: transparent"]CHF[/TD]
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
0
[TD="width: 64, bgcolor: transparent"]
10
[TD="width: 64, bgcolor: transparent"]
10
[/TR]
</tbody>[/TABLE]
The formulat in F2 is =SUMPRODUCT($B$2:$B$10;1*($C$2:$C$10=$E2);1*($A$2:$A$10=F$1))
However, since ALFA145 and ALFA146 are related, I would like to add these two accounts together. I know in sumproduct I can add a --(ISNUMBER(MATCH($A$2:$A$10; {"ALFA145,ALFA146"};0)).
The question is: is there a way of populating the {"ALFA145,ALFA145"} automatically. What I would really like is a way of automatically generating the vector based on the headers? I.e, I want to get to this result:
[TABLE="width: 105"]
<tbody>[TR]
[TD="width: 9%, bgcolor: transparent"][/TD]
[TD="width: 17%, bgcolor: transparent"]E[/TD]
[TD="width: 20%, bgcolor: transparent"]F[/TD]
[TD="width: 13%, bgcolor: transparent"]G[/TD]
[TD="width: 14%, bgcolor: transparent"]H[/TD]
[TD="width: 10%, bgcolor: transparent"]I[/TD]
[TD="width: 14%, bgcolor: transparent"]J[/TD]
[/TR]
[TR]
[TD="width: 9%, bgcolor: transparent"]1[/TD]
[TD="width: 17%, bgcolor: transparent"]TOTAL BALANCES[/TD]
[TD="width: 20%, bgcolor: transparent"]ALFA145,ALFA146[/TD]
[TD="width: 13%, bgcolor: transparent"]ALFA155[/TD]
[TD="width: 14%, bgcolor: transparent"]ALFA75[/TD]
[TD="width: 10%, bgcolor: transparent"]ALFA90[/TD]
[TD="width: 14%, bgcolor: transparent"]ALFA164[/TD]
[/TR]
[TR]
[TD="width: 9%, bgcolor: transparent"]2[/TD]
[TD="width: 17%, bgcolor: transparent"]USD[/TD]
[TD="width: 20%, bgcolor: transparent"]
400
[TD="width: 13%, bgcolor: transparent"]
70
[TD="width: 14%, bgcolor: transparent"]
0
[TD="width: 10%, bgcolor: transparent"]
0
[TD="width: 14%, bgcolor: transparent"]
0
[/TR]
[TR]
[TD="width: 9%, bgcolor: transparent"]3[/TD]
[TD="width: 17%, bgcolor: transparent"]EUR[/TD]
[TD="width: 20%, bgcolor: transparent"]
0
[TD="width: 13%, bgcolor: transparent"]
0
[TD="width: 14%, bgcolor: transparent"]
120
[TD="width: 10%, bgcolor: transparent"]
0
[TD="width: 14%, bgcolor: transparent"]
90
[/TR]
[TR]
[TD="width: 9%, bgcolor: transparent"]4[/TD]
[TD="width: 17%, bgcolor: transparent"]JPY[/TD]
[TD="width: 20%, bgcolor: transparent"]
0
[TD="width: 13%, bgcolor: transparent"]
0
[TD="width: 14%, bgcolor: transparent"]
0
[TD="width: 10%, bgcolor: transparent"]
150
[TD="width: 14%, bgcolor: transparent"]
0
[/TR]
[TR]
[TD="width: 9%, bgcolor: transparent"]5[/TD]
[TD="width: 17%, bgcolor: transparent"]CHF[/TD]
[TD="width: 20%, bgcolor: transparent"]
0
[TD="width: 13%, bgcolor: transparent"]
0
[TD="width: 14%, bgcolor: transparent"]
0
[TD="width: 10%, bgcolor: transparent"]
0
[TD="width: 14%, bgcolor: transparent"]
10
[/TR]
</tbody>[/TABLE]
This way I can add accounts (say I wanto to sum ALFA90 and ALFA75 as they are related) by using "," separators and the formula will just get updated. This will also allow me to have multiple accounts easier than dedicating several cells.