Only add numbers within a calendar year...

  • Thread starter Thread starter Corey
  • Start date Start date
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
 
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.
 
Hi

=SUMPRODUCT(--(YEAR(DateRange)=2004),ValueRange)


Arvi Laanemets
 
Thanks a bunch!!! That worked perfectly.

Corey
-----Original Message-----
Hi

=SUMPRODUCT(--(YEAR(DateRange)=2004),ValueRange)


Arvi Laanemets





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top