SUM if date is between ...

  • Thread starter Thread starter Piotr
  • Start date Start date
P

Piotr

Hi is it possible to make such function ?
I need to sum values for records which are invoiced in particular
period of time.

best regards
Peter
 
Try something like this:


For data in A1:B100 with dates in Col_A and amounts in Col_B

C1: =SUMPRODUCT((A1:A100>=StartDate)*(A1:A100<=EndDate)*(B1:B100))

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP
 
Dates in column A, amounts in column B
=SUMPRODUCT(--(A1:A1000>=DATE(2006,1,1),--(A1:A1000=<DATE(2006,4,30),B1:B1000)
Do not try using entire column as in A:A as SUMPRODUCT does not work with
this.

OR
=SUMIF(A1:A1000,">="&DATE(2006,1,1),B1:B1000)-SUMIF(A1:A1000,">="&DATE(2006,4,30),B1:B1000)
For some reason my XL displayed a date value so I had to format the cell
general.
best wishes
 
where the dates desired are in b1 and b2
=sumproduct((a2:a22>b1)*(a2:a22<=b2)*b2:b22)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top