With a separate column, created with:
=MONTH(A2)
in B2:
=SUMIF($B$2:$B$48,K2,$H$2:$H$48)
where K2 is a month number like 10.
But, if you opt for this route, include the year component:
B2:
=A2-DAY(A2)+1
and in K2 enter as the date condition something like:
1-Oct-2005
which is a first day date of the month/year of interest.
Since you have a small range to process, you might want to opt for:
=SUMPRODUCT(--($A$2:$A$48-DAY($A$2:$A$48)+1=K2),$H$2:$H$48)
where K2 houses the first day date of the month/year of interest.
Bruce Gray wrote:
Closest solution I have so far is to make a separate column for month
=month(a2)
Then use =SUM(IF(B2:B48=10,H2:H48),0)
10 being october
|