libreoffice - Refer to arguments in SUMIFS conditional -
i want create sumifs condition can refer both arguments. want able "if month , year of first argument equal month , year of second argument." however, examples of sumifs i've seen have condition such "=food", can't perform function on other argument. how can accomplished?
sumproduct more powerful sumifs, although harder understand.
=sumproduct( month(b1:b20)=month(d1), year(b1:b20)=year(d1), c1:c20 )
this checks rows 1 20 see if month of date in column b equal month of d1, , likewise year. if both equal, sums value column c of row.
details on how sumproduct works:
if either month or year not equal, result of first or second array row zero. gets multiplied whatever in column c, resulting in zero. value gets summed row zero; in other words, ignored.
Comments
Post a Comment