=sumif()

F

Francis Hookham

Given a column in which dates are shown and another in which money is shown,
is it possible to have a ŒCOUNTIF¹ which will sum those values in the money
column which have the same ŒMONTH¹ AND ŒYEAR¹ values in the other column?
With dates in column B and values in column F, for starters (month only) I
tried:

=SUMIF(F6:F12,MONTH(B6:B12)=3,F6:F12)
and
=SUMIF(B6:B12,"MONTH(B6:B12=3)",F6:F12)

and got zero instead of a sum of the values with March as the date,
expecting to later turn the MONTH(B6:B12)=3 into
AND(MONTH(B6:B12)=3,YEAR(B6:B12)=2004)

Either I¹ve got something wrong or I am expecting too much of XL (never!)

Francis Hookham
 
D

Domenic

Hi Francis,

try,

=SUMPRODUCT((MONTH(B6:B12)=3)*(YEAR(B6:B12)=2004)*(F6:F12))

Hope this helps!
 
F

Francis Hookham

Great! - thanks Domenic

=SUMPRODUCT((MONTH(B6:B12)=3)*(YEAR(B6:B12)=2004)*(F6:F12))
 

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