S
Stan Brown
In my checking-account spreadsheet, I have
A4 and below - date
E4 and below - deposit amount
H4 and below - comment
B2 - today's date or as-of date
(Rows 1 to 3 of columns A and E are just text headers, not numbers or
formulas.)
I want to summarize interest for the current year (year that matches
B2's year, comment equals "Interest"). The following array formula
works, but I have to remember to update it when transactions go below
row 699:
{ =SUM( (YEAR(A4:A699)=YEAR(B$2))*(H4:H699="Interest")*E4:E699 ) }
It seems this should be doable with a sumproduct, so I type:
=SUMPRODUCT(E:E, --(YEAR(A:A)=YEAR($B$2)), --(H:H="Interest"))
but I get a #NUM. When I change it to
=SUMPRODUCT(E4:E, --(YEAR(A4:A)=YEAR($B$2)), --(H4:H="Interest"))
I get #NAME.
Making the references absolute didn't help:
=SUMPRODUCT($E:$E, --(YEAR($A:$A)=YEAR($B$2)), --($H:$H="Interest"))
still gets #NUM.
What am I doing wrong, and what's the solution? Thanks!
A4 and below - date
E4 and below - deposit amount
H4 and below - comment
B2 - today's date or as-of date
(Rows 1 to 3 of columns A and E are just text headers, not numbers or
formulas.)
I want to summarize interest for the current year (year that matches
B2's year, comment equals "Interest"). The following array formula
works, but I have to remember to update it when transactions go below
row 699:
{ =SUM( (YEAR(A4:A699)=YEAR(B$2))*(H4:H699="Interest")*E4:E699 ) }
It seems this should be doable with a sumproduct, so I type:
=SUMPRODUCT(E:E, --(YEAR(A:A)=YEAR($B$2)), --(H:H="Interest"))
but I get a #NUM. When I change it to
=SUMPRODUCT(E4:E, --(YEAR(A4:A)=YEAR($B$2)), --(H4:H="Interest"))
I get #NAME.
Making the references absolute didn't help:
=SUMPRODUCT($E:$E, --(YEAR($A:$A)=YEAR($B$2)), --($H:$H="Interest"))
still gets #NUM.
What am I doing wrong, and what's the solution? Thanks!