Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DP7 DP7 is offline
external usenet poster
 
Posts: 54
Default Help with sum based on dates

I have a column that contains dates & quantities I would like to sum based on
date ranges that I would define. For example I would want the sum quantities
whose dates fall in-between Nov. 11 & Nov 17. Nov. 18 & 24€¦.. So on & so
forth. I have been trying to figure out a way to do this with maybe a v
lookup or pivot table. However I have not been able to do so. If anyone has
any ideas as to how I can do what I want to do I would be very grateful.
Thanks in advance.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Help with sum based on dates

One way, something along these lines

Assuming source dates (real dates) within A2:A100, amounts in B2:B100
Then in say, D2:
=SUMPRODUCT((A$2:A$100=--"11-Nov-2007")*(A$2:A$100<=--"23-Nov-2007"),B$2:B$100)
will return the sum of amounts for dates between 11 Nov 2007 to 23 Nov 2007
(inclusive)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"DP7" wrote:
I have a column that contains dates & quantities I would like to sum based on
date ranges that I would define. For example I would want the sum quantities
whose dates fall in-between Nov. 11 & Nov 17. Nov. 18 & 24€¦.. So on & so
forth. I have been trying to figure out a way to do this with maybe a v
lookup or pivot table. However I have not been able to do so. If anyone has
any ideas as to how I can do what I want to do I would be very grateful.
Thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Help with sum based on dates

Try something like this:

With
Col_A containing dates, A1: Dates
Col_B containing quantities, B1: Qty

And
D1: Week Beginning
D2: (a WeekStartDate...eg 11-NOV-2007)

This formula returns the sum of Qty for the 7 days beginning with the
WeekStartDate in D2:
E2: =SUMPRODUCT(($A$2:$A$50<(D2+{0,7}))*($B$2:$B$50*{-1,1}))

or...in a longer form:
E2: =SUMPRODUCT(($A$2:$A$50=D2)*($A$2:$A$50<D2+7)*($B $2:$B$50))

--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"DP7" wrote in message
...
I have a column that contains dates & quantities I would like to sum based
on
date ranges that I would define. For example I would want the sum
quantities
whose dates fall in-between Nov. 11 & Nov 17. Nov. 18 & 24... So on & so
forth. I have been trying to figure out a way to do this with maybe a v
lookup or pivot table. However I have not been able to do so. If anyone
has
any ideas as to how I can do what I want to do I would be very grateful.
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
Printing, VB - based on dates Danny Excel Worksheet Functions 4 August 14th 07 08:16 PM
Sum based on the dates in a different row. Gary Excel Worksheet Functions 1 February 8th 07 08:17 PM
how to sum up or count based on dates Syahira New Users to Excel 2 May 11th 06 10:53 AM
how to sum up based on dates Syahira Excel Discussion (Misc queries) 2 May 11th 06 10:37 AM
Averages based on dates PA Excel Worksheet Functions 6 April 11th 06 04:37 AM


All times are GMT +1. The time now is 08:49 AM.

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"