ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to create a formula to calculate a sum of cells from a date ra (https://www.excelbanter.com/excel-worksheet-functions/175602-how-create-formula-calculate-sum-cells-date-ra.html)

RayRay

How to create a formula to calculate a sum of cells from a date ra
 
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

Bob Phillips

How to create a formula to calculate a sum of cells from a date ra
 
=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)



"RayRay" wrote in message
...
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




RayRay

How to create a formula to calculate a sum of cells from a dat
 
It did not work. It adds the date.

"Bob Phillips" wrote:

=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)



"RayRay" wrote in message
...
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





RayRay

How to create a formula to calculate a sum of cells from a dat
 
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

"RayRay" wrote:

It did not work. It adds the date.

"Bob Phillips" wrote:

=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)



"RayRay" wrote in message
...
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





Bob Phillips

How to create a formula to calculate a sum of cells from a dat
 
Which is exactly what my formula does.

--
---
HTH

Bob


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



"RayRay" wrote in message
...
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

"RayRay" wrote:

It did not work. It adds the date.

"Bob Phillips" wrote:

=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)



"RayRay" wrote in message
...
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







All times are GMT +1. The time now is 09:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com