View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Calculation Between 2 Dates

With the dates in A, Qty in B, Value in C
Start date in F1 and end date in G1
Use formula =SUMPRODUCT(--(A1:A4=F10),--(A1:A4<=G1),B1:B4) to add all Qty
between the two dates (inclusive)
Note that only in XL2007 can you use full column references with SUMPRODUCT
=SUMPRODUCT(--(A:A=F10),--(A:A<=G1),B:B
Or use longer formula
=SUMIF(A1:A4,"="&F1,B1:B4)-SUMIF(A1:A4,""&G1,B1:B4)
or full column equivalent (in any version of Excel)

best wishes
--
Bernard Liengme
MVP Excel
http://people.stfx.ca

"LF" wrote in message
...
Hi, I am trying to find a formula how 2 calculate the sum between 2 Dates

I have a sheet contains a lot of information
Starting Date Qty Value
14/04/2009 10 1000
14/04/2009 15 2000
15/04/2009 2 1000
30/04/2009 1 1000

the sheet is long, & I need to create a summary report which shows the sum
by selecting the range according to the date

I have used the sumif but it doesn't work

please assist

thank you
--
LF