sumif between dates

C

chrismania

I want to count the contract value of customers if the the contract is
made between to dates.
something like
sumif (a1:a10,"<37562",b1:b10)
But here how do I make between dates. Furthermore the "<37562" ought to
refer to a cell.

Thanks Guys
 
P

Peo Sjoblom

One way

=SUMIF(A1:A10,">="&C1,B1:B10)-SUMIF(A1:A10,">"&C2,B1:B10)

where C1 holds the startdate and C2 the end date, i.e. if you want to sum B1
when A1 is between
10/01/03 and 10/15/03 then C1 holds the former date and C2 the latter. If
you want to exclude the end
date change ">" to ">="
 
H

Harald Staff

Hi

First, set cell reference like this
sumif (a1:a10,"<"&F1,b1:b10)


Sumif takes one criteria only, so for all March dates (pseudo):
=Sumif(a, >= march 1, b) - Sumif(a, > april 1, b)

Or use sumproduct instead:
=SUMPRODUCT((A1:A10>=F1)*(A1:A10<=G1)*(B1:B10))
 

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

Top