Only add numbers within a calendar year...

C

Corey

I'm trying to enter a formula that will only calculate
additions within the year 2004. For instance, I have a
spreadsheet with additions from 1995 to date. One column
contains the dates while another has the value. What would
be the formula for the sum of all 2004 additions?

Any help is much appreciated.

Thanks.

Corey
 
E

Earl Kiosterud

Corey,

=SUMPRODUCT((A2:A200)*(YEAR(B2:B200)=2004))

Enter as array formula (Ctrl-Shift-Enter). Values in column A; dates in
column B.

If you'll need totals for each year, you may wish to use a pivot table.
Make a helper column which calculates the year:
=YEAR(B2)
then use that column in the grouping (row or column) of a pivot table.
 
Top