Reputation: 61
How can I get the sum of column B if the dates from Column A fall in the current year? I have a Cell to represent the current year: Cell I1 =YEAR(TODAY())
Upvotes: 1
Views: 675
Reputation: 59495
Please try:
=SUMIFS(B:B,A:A,">="&DATE(I1,1,1),A:A,"<="&DATE(I1,12,31))
DATE.
Upvotes: 1
Reputation: 522817
In column C enter the following formula:
=IF(YEAR(A1)=$I$1, B1, 0)
Then take SUM(C1:CN)
to get the column B sum you are after, replacing CN
with the actual last cell you have.
Upvotes: 1