sumproduct including previous years

T

tleehh

=sumproduct(d18:d1000,--(year(b18:b1000)=year(now())))
I need a formula to add all the values in d18:d1000. All the previous years
including current year.
 
R

Rick Rothstein

Unless you have future dates in Column D along with non-zero values in
Column B, wouldn't you just want this?

=SUM(D18:D1000)

If you do actually have future dates that you have to filter out, try
this...

=SUMPRODUCT(D18:D1000,--(Year(B18:B1000)<=YEAR(NOW())))
 
Top