Summing up values only if month = *any month*

  • Thread starter Thread starter gbaia
  • Start date Start date
G

gbaia

I'm fairly new to excel programming.

What I have is:

one column that displays dates and the one next to it display values in
currency type

eg:

04-Jan-2004 | 80
03-Apr-2004 | 25
05-Apr-2004 | 45
06-Jun-2004 | 35

In another column, I want:

if Month is april on the first column, then, sum the values only from
this row.

As it is now, I get an error since I'm using Month(C2:C5) and it seems
like Month doens't like the group values.
Second, even if it works, it'd get the sum from all the rows...

Which function would help me doing this?

Many Thanks!!!!

** Posted via: http://www.ozgrid.com
Excel Templates, Training, Add-ins & Software!
http://www.ozgrid.com/Services/excel-software-categories.htm **
 
Hi

One way:
=SUMPRODUCT((MONTH(A2:A1000)=4)*(B2:B1000))
for April
=SUMPRODUCT((MONTH(A2:A1000)=5)*(B2:B1000))
for May etc.
 

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