View Single Post
  #5   Report Post  
D@annyBoy
 
Posts: n/a
Default

I have 2 columns of data
Under A is the dates
Under G is the values

I am trying to add up all the values if the month is Jan
"=" & DATE(1,1,2004), "<=" & DATE(31,1,2004),




"JE McGimpsey" wrote in message
...
One way:

Assume your data are in columns A (Dates) and B (Values), and that your
criteria dates are in D1 and D2 (inclusive):

=SUMIF(A:A,"=" & D1, B:B) - SUMIF(A:A, "" & D2, B:B)

or

=SUMPRODUCT(--(A1:A1000=D1),--(A1:A1000<=D2),B1:B1000)

(See

http://www.mcgimpsey.com/excel/doubleneg.html

for an explanation of the "--").


In article ,
"Lius" wrote:

How do I add up a range of cells using dates as a criteria?