Hey everybody,
I've been racking my brain around this for a few hours now and just cant seem to come up with the answer, was hoping someone here may have a better idea than me.
Essentially, I have a database where I need to SUM a range IF the criteria in two cells of two columns are met, however these are variable.
Example below:
[TABLE="width: 884"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 884"]
<tbody>[TR]
[TD]First name[/TD]
[TD]Last Name[/TD]
[TD] Irrelevant[/TD]
[TD]Individual Value[/TD]
[TD]Irrelevant[/TD]
[TD]Irrelevant[/TD]
[TD]Irrelevant details[/TD]
[/TR]
[TR]
[TD]ABCD[/TD]
[TD]WZYZ[/TD]
[TD="align: right"]918[/TD]
[TD="align: right"]1275[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ABCD[/TD]
[TD]WZYZ[/TD]
[TD="align: right"]2090[/TD]
[TD="align: right"]7434[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ABCD[/TD]
[TD]WZYZ[/TD]
[TD="align: right"]1982[/TD]
[TD="align: right"]14440[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ERTY[/TD]
[TD]KJHG[/TD]
[TD="align: right"]2458[/TD]
[TD="align: right"]10017[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTY[/TD]
[TD]KJHG[/TD]
[TD="align: right"]1691[/TD]
[TD="align: right"]6622[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTY[/TD]
[TD]KJHG[/TD]
[TD="align: right"]479[/TD]
[TD="align: right"]13841[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]355[/TD]
[TD="align: right"]13947[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]1245[/TD]
[TD="align: right"]6083[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]1877[/TD]
[TD="align: right"]14466[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]2150[/TD]
[TD="align: right"]1476[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]1498[/TD]
[TD="align: right"]1024[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]2931[/TD]
[TD="align: right"]15999[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]2613[/TD]
[TD="align: right"]1091[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]246[/TD]
[TD="align: right"]10351[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]1857[/TD]
[TD="align: right"]3900[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]900[/TD]
[TD="align: right"]5565[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]1754[/TD]
[TD="align: right"]12680[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]302[/TD]
[TD="align: right"]8749[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]2262[/TD]
[TD="align: right"]1590[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]2237[/TD]
[TD="align: right"]13887[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]1533[/TD]
[TD="align: right"]14075[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]2378[/TD]
[TD="align: right"]1904[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
</tbody>[/TABLE]
So, essentially, I need to SUM G each time the corresponding A and or B changes value.
So here Id SUM G2:4 and then 6:8 etc...
Just to make things that bit more difficult the first and last names here will pop up again in random combinations with each and others further down the list.
I've been racking my brain around this for a few hours now and just cant seem to come up with the answer, was hoping someone here may have a better idea than me.
Essentially, I have a database where I need to SUM a range IF the criteria in two cells of two columns are met, however these are variable.
Example below:
[TABLE="width: 884"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 884"]
<tbody>[TR]
[TD]First name[/TD]
[TD]Last Name[/TD]
[TD] Irrelevant[/TD]
[TD]Individual Value[/TD]
[TD]Irrelevant[/TD]
[TD]Irrelevant[/TD]
[TD]Irrelevant details[/TD]
[/TR]
[TR]
[TD]ABCD[/TD]
[TD]WZYZ[/TD]
[TD="align: right"]918[/TD]
[TD="align: right"]1275[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ABCD[/TD]
[TD]WZYZ[/TD]
[TD="align: right"]2090[/TD]
[TD="align: right"]7434[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ABCD[/TD]
[TD]WZYZ[/TD]
[TD="align: right"]1982[/TD]
[TD="align: right"]14440[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ERTY[/TD]
[TD]KJHG[/TD]
[TD="align: right"]2458[/TD]
[TD="align: right"]10017[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTY[/TD]
[TD]KJHG[/TD]
[TD="align: right"]1691[/TD]
[TD="align: right"]6622[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTY[/TD]
[TD]KJHG[/TD]
[TD="align: right"]479[/TD]
[TD="align: right"]13841[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]355[/TD]
[TD="align: right"]13947[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]1245[/TD]
[TD="align: right"]6083[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]1877[/TD]
[TD="align: right"]14466[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]2150[/TD]
[TD="align: right"]1476[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]1498[/TD]
[TD="align: right"]1024[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]2931[/TD]
[TD="align: right"]15999[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]2613[/TD]
[TD="align: right"]1091[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]246[/TD]
[TD="align: right"]10351[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]VBNK[/TD]
[TD]FGHJ[/TD]
[TD="align: right"]1857[/TD]
[TD="align: right"]3900[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]900[/TD]
[TD="align: right"]5565[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]1754[/TD]
[TD="align: right"]12680[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]302[/TD]
[TD="align: right"]8749[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]2262[/TD]
[TD="align: right"]1590[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]2237[/TD]
[TD="align: right"]13887[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]1533[/TD]
[TD="align: right"]14075[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
[TR]
[TD]ERTYU[/TD]
[TD]THJM[/TD]
[TD="align: right"]2378[/TD]
[TD="align: right"]1904[/TD]
[TD]date here[/TD]
[TD]date here[/TD]
[TD]Details 12345678910[/TD]
[/TR]
</tbody>[/TABLE]
So, essentially, I need to SUM G each time the corresponding A and or B changes value.
So here Id SUM G2:4 and then 6:8 etc...
Just to make things that bit more difficult the first and last names here will pop up again in random combinations with each and others further down the list.