How to create a formula to calculate a sum of cells from a date ra

R

RayRay

I want to create a sum of hours worked (Column B) to a date range (Column B)
and report it in another cell.

A B
1 Date OT Hrs
2 1/3/08 0.5
3 1/5/08 1.25
4 2/1/08 3.0

So when I create the formula it would tell me that I worked 1.75Hrs in Jan
 
B

Bob Phillips

=SUMIF(A:A,">=2008-01-01",B:B)-SUMIF(A:A,">=2008-02-01",B:B)

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
R

RayRay

It did not work. It adds the date.

Bob Phillips said:
=SUMIF(A:A,">=2008-01-01",B:B)-SUMIF(A:A,">=2008-02-01",B:B)

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
R

RayRay

I stated it incorrectly: (Should have said)

I want to create a sum of hours worked (Column B) related to the dates or
range of dates provided (Column A) and report those hours in another cell.

so in the original example, when I create the formula it would tell me that
I worked 1.75Hrs in Jan
 
B

Bob Phillips

Which is exactly what my formula does.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Top