I can usethe countif and sumif functions in case of 1 range. But there are 2 ranges wherewithI have to work and I don’t have any idea. I would like to collect the uniqueconnect between elements of two ranges, count how many are them and how much isthe total of their values. See the example. Can anybody help me?
[TABLE="class: outer_border, ******* 142"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]A range[/TD]
[TD]B range[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ee[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]bb[/TD]
[TD]ee[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]cc[/TD]
[TD]gg[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ff[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]dd[/TD]
[TD]gg[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]bb[/TD]
[TD]ff[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]cc[/TD]
[TD]gg[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ee[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ff[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ff[/TD]
[TD="align: right"]4[/TD]
[/TR]
</tbody>[/TABLE]
<strike></strike>
[TABLE="class: outer_border, ******* 245"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD="colspan: 2"]unique connection between the elements of the ranges[/TD]
[TD]Quantity[/TD]
[TD]sum of values[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ee[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ff[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]13[/TD]
[/TR]
[TR]
[TD]bb[/TD]
[TD]ee[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]bb[/TD]
[TD]ff[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]cc[/TD]
[TD]gg[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]19[/TD]
[/TR]
[TR]
[TD]dd[/TD]
[TD]gg[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]5[/TD]
[/TR]
</tbody>[/TABLE]
<strike></strike>
[TABLE="class: outer_border, ******* 142"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]A range[/TD]
[TD]B range[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ee[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]bb[/TD]
[TD]ee[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]cc[/TD]
[TD]gg[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ff[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]dd[/TD]
[TD]gg[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]bb[/TD]
[TD]ff[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]cc[/TD]
[TD]gg[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ee[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ff[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ff[/TD]
[TD="align: right"]4[/TD]
[/TR]
</tbody>[/TABLE]
<strike></strike>
[TABLE="class: outer_border, ******* 245"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD="colspan: 2"]unique connection between the elements of the ranges[/TD]
[TD]Quantity[/TD]
[TD]sum of values[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ee[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD]aa[/TD]
[TD]ff[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]13[/TD]
[/TR]
[TR]
[TD]bb[/TD]
[TD]ee[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]bb[/TD]
[TD]ff[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]cc[/TD]
[TD]gg[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]19[/TD]
[/TR]
[TR]
[TD]dd[/TD]
[TD]gg[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]5[/TD]
[/TR]
</tbody>[/TABLE]
<strike></strike>