jsunsnow
jsunsnow

Reputation: 61

I want the sum of column B based on current year

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

Answers (2)

pnuts
pnuts

Reputation: 59495

Please try:

=SUMIFS(B:B,A:A,">="&DATE(I1,1,1),A:A,"<="&DATE(I1,12,31))

SUMIFS.

DATE.

Upvotes: 1

Tim Biegeleisen
Tim Biegeleisen

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

Related Questions