Sum column of numbers based on date in another column

  • Thread starter Thread starter Kurt
  • Start date Start date
K

Kurt

I have a spreadsheet with the date as column A and hours
in column B. The date is in mm/dd/yyyy format. I am
trying to sumarize the hours in column B for a given
month.

The rows will have 02/15/04, 02/22/04, 02/29,04, 03/07/04,
03/15/04 and so on.

I want to summarize rows for February and March for
example.

I was trying to use the sumif(range,monthfunction,range)
but I can not seem to get it to work. I was trying to
test column A for a month and if the month was 2 I wanted
to summarize column B for February and then do the same
for March and so on.

Any thoughts?
 
Hi
try
=SUMPRODUCT((MONTH(A1:A100)=2)*(A1:A100<>""),B1:B100)
to sum the February results
 

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