Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Sumproduct on Dates?

I have a column of dates (in calendar order3/1/08, 3/2/08, 3/3/08,etc...) and
a column of corresponding $ amounts next to each date. I need to be able to
enter a date in a cell and enter a number of days for instance "5" in another
cell and in a third cell return the sum of $ amount associated with the 5
days starting with the date entered.

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Sumproduct on Dates?

=SUMPRODUCT(--(Date_Range=A2),--(Date_Range<A2+B2),Amount_Range)

A2 start date, B2 number of days, if you put 5 in B2 and you want to include
the
date in A2 as one of the 5 days use the above. If you want 5 days plus the
date in A2 change the < to <=




--


Regards,


Peo Sjoblom



"Adam" wrote in message
...
I have a column of dates (in calendar order3/1/08, 3/2/08, 3/3/08,etc...)
and
a column of corresponding $ amounts next to each date. I need to be able
to
enter a date in a cell and enter a number of days for instance "5" in
another
cell and in a third cell return the sum of $ amount associated with the 5
days starting with the date entered.

Thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sumproduct on Dates?

Try one of these:

A1:A20 = dates
B1:B20 = amounts to sum
D1 = start date
E1 = number of days

=SUMIF(A1:A20,"="&D1,B1:B20)-SUMIF(A1:A20,"="&D1+E1,B1:B20)

Format as GENERAL or NUMBER

=SUM(OFFSET(B1,MATCH(D1,A1:A20,0)-1,,E1))


--
Biff
Microsoft Excel MVP


"Adam" wrote in message
...
I have a column of dates (in calendar order3/1/08, 3/2/08, 3/3/08,etc...)
and
a column of corresponding $ amounts next to each date. I need to be able
to
enter a date in a cell and enter a number of days for instance "5" in
another
cell and in a third cell return the sum of $ amount associated with the 5
days starting with the date entered.

Thanks in advance



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
sumproduct with dates Jake New Users to Excel 2 March 30th 08 05:26 PM
sumproduct & dates [email protected] Excel Worksheet Functions 3 October 24th 07 03:03 AM
SUMPRODUCT - DIFFERENT DATES Danny Excel Worksheet Functions 1 August 25th 07 03:57 AM
sumproduct with dates Bumblebee Excel Worksheet Functions 2 August 22nd 06 08:16 PM
sumproduct between dates Dominique Feteau Excel Worksheet Functions 8 December 5th 04 09:56 PM


All times are GMT +1. The time now is 06:16 AM.

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

About Us

"It's about Microsoft Excel"