ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to total items if they fall between a date range (https://www.excelbanter.com/excel-discussion-misc-queries/26470-how-total-items-if-they-fall-between-date-range.html)

cel

How to total items if they fall between a date range
 
I have a range of items that fall under a date range.
I am trying to total the items that fall under a certian date range.

ie.
20-Apr-05 25-Apr-05 1-May-05 16-May-05
A $1.00 $0.00 $0.00 $0.00
B $19.00 $0.00 $10.00 $0.00
C $0.00 $5.00 $0.00 $0.00
D $0.00 $0.00 $0.00 $20.00
total $20.00 $5.00 $10.00 $20.00

If dates fall between 1-Apr-05 and 30-Apr-05, total totals = $25.00
If dates fall between 1-May-01 and 31-May-05, total totals = $30.00
If dates fall in the year 2005, total totals = $55.00

How do I do this?


Ron Rosenfeld

On Tue, 17 May 2005 10:15:48 -0700, cel wrote:

I have a range of items that fall under a date range.
I am trying to total the items that fall under a certian date range.

ie.
20-Apr-05 25-Apr-05 1-May-05 16-May-05
A $1.00 $0.00 $0.00 $0.00
B $19.00 $0.00 $10.00 $0.00
C $0.00 $5.00 $0.00 $0.00
D $0.00 $0.00 $0.00 $20.00
total $20.00 $5.00 $10.00 $20.00

If dates fall between 1-Apr-05 and 30-Apr-05, total totals = $25.00
If dates fall between 1-May-01 and 31-May-05, total totals = $30.00
If dates fall in the year 2005, total totals = $55.00

How do I do this?


Assume your row of dates is NAME'd "Date" and your total row is NAME'd
"total".

The formula would be:

=SUMIF(Dates,"="&StartDate,total)-SUMIF(Dates,""&EndDate,total)


--ron


All times are GMT +1. The time now is 01:36 PM.

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