I have two set of tables:
1) In the first table I have a series of percentages associated each with a code (e.g. C2, C18, C20):
[TABLE="width: 500"]
<tbody>[TR]
[TD]C2[/TD]
[TD]C18[/TD]
[TD]C20[/TD]
[TD]C12[/TD]
[TD]C5[/TD]
[TD]C6[/TD]
[/TR]
[TR]
[TD]20%[/TD]
[TD]16%[/TD]
[TD]20%[/TD]
[TD]5%[/TD]
[TD]4%[/TD]
[TD]12%[/TD]
[/TR]
</tbody>[/TABLE]
2) In the second table I have values associated with the same codes as in the first table (i.e. C2, C18, etc):
[TABLE="width: 500"]
<tbody>[TR]
[TD]C2[/TD]
[TD]C12[/TD]
[TD]C6[/TD]
[TD]C3[/TD]
[TD]C9[/TD]
[TD]C18[/TD]
[TD]C5[/TD]
[TD]C20[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]234[/TD]
[TD]25[/TD]
[TD]17[/TD]
[TD]27[/TD]
[TD]15[/TD]
[TD]30[/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]
What I would like to do is to multiply the percentage values in Table 1 by the values in Table 2 that are associated with the same Cx code and sum them all (i.e. 20%*100+16%*15+20%*50, etc.).
I have tried using sumproduct and sumproduct with INDEX MATCH but could not make it work...
Many thanks!
1) In the first table I have a series of percentages associated each with a code (e.g. C2, C18, C20):
[TABLE="width: 500"]
<tbody>[TR]
[TD]C2[/TD]
[TD]C18[/TD]
[TD]C20[/TD]
[TD]C12[/TD]
[TD]C5[/TD]
[TD]C6[/TD]
[/TR]
[TR]
[TD]20%[/TD]
[TD]16%[/TD]
[TD]20%[/TD]
[TD]5%[/TD]
[TD]4%[/TD]
[TD]12%[/TD]
[/TR]
</tbody>[/TABLE]
2) In the second table I have values associated with the same codes as in the first table (i.e. C2, C18, etc):
[TABLE="width: 500"]
<tbody>[TR]
[TD]C2[/TD]
[TD]C12[/TD]
[TD]C6[/TD]
[TD]C3[/TD]
[TD]C9[/TD]
[TD]C18[/TD]
[TD]C5[/TD]
[TD]C20[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]234[/TD]
[TD]25[/TD]
[TD]17[/TD]
[TD]27[/TD]
[TD]15[/TD]
[TD]30[/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]
What I would like to do is to multiply the percentage values in Table 1 by the values in Table 2 that are associated with the same Cx code and sum them all (i.e. 20%*100+16%*15+20%*50, etc.).
I have tried using sumproduct and sumproduct with INDEX MATCH but could not make it work...
Many thanks!