Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default sum between a range of dates

I have 2 columns. Column A contains 365 rows with dates from 01-01-2008 to
31-12-2008. Column B contains a sum for each day.

I would like to be able to make a total sum of the rows in column B, which
lies between two dates in column A.

For example. from 21-06-2008 to 03-07-2008 = sum.

Sincerely,

H. Nissen
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default sum between a range of dates

With the two dates in F1 and F2
a) =SUMIF(A:A,"="&F1,B:B)-SUMIF(A:A,""&F2,B:B)
b) =SUMPRODUCT(--(A1:A100=F1),--(A1:A100<=F2),B1:B100)
Note: only XL2007 lets SUMPRODUCT use full column references as in A:A

If you want to enter the actual date in the formula, I recommend
=SUMPRODUCT(--(A1:A100=DATE(2008,06,21),--(A1:A100<=DATE(2008,07,03),B1:B100)

I have use = and <= to make both dates inclusive; fix as needed
For more on SUMPRPODUCT see
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"H. Nissen" wrote in message
...
I have 2 columns. Column A contains 365 rows with dates from 01-01-2008 to
31-12-2008. Column B contains a sum for each day.

I would like to be able to make a total sum of the rows in column B, which
lies between two dates in column A.

For example. from 21-06-2008 to 03-07-2008 = sum.

Sincerely,

H. Nissen



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default sum between a range of dates

Dear Bernard
Thx for the forms, they both work very fine. Thx :)

Sincerely,

H. Nissen


"Bernard Liengme" wrote:

With the two dates in F1 and F2
a) =SUMIF(A:A,"="&F1,B:B)-SUMIF(A:A,""&F2,B:B)
b) =SUMPRODUCT(--(A1:A100=F1),--(A1:A100<=F2),B1:B100)
Note: only XL2007 lets SUMPRODUCT use full column references as in A:A

If you want to enter the actual date in the formula, I recommend
=SUMPRODUCT(--(A1:A100=DATE(2008,06,21),--(A1:A100<=DATE(2008,07,03),B1:B100)

I have use = and <= to make both dates inclusive; fix as needed
For more on SUMPRPODUCT see
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"H. Nissen" wrote in message
...
I have 2 columns. Column A contains 365 rows with dates from 01-01-2008 to
31-12-2008. Column B contains a sum for each day.

I would like to be able to make a total sum of the rows in column B, which
lies between two dates in column A.

For example. from 21-06-2008 to 03-07-2008 = sum.

Sincerely,

H. Nissen




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Identifying unique dates in a range of cells containing dates... cdavidson Excel Discussion (Misc queries) 4 October 13th 06 03:30 PM
Identifying unique dates within a range of cells containing dates cdavidson Excel Discussion (Misc queries) 0 October 12th 06 08:19 PM
How do I find the earliest dates in a range of dates? JJ Excel Worksheet Functions 3 May 16th 06 09:36 AM
Find dates in a range; then sum values in that range by a criteria Anders Excel Discussion (Misc queries) 4 October 21st 05 03:41 PM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM


All times are GMT +1. The time now is 07:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"