Google-sheets – “IF” Function Question

formulasgoogle sheetsgoogle-appsgoogle-sheets-queryworksheet-function

So I have run into an issue…
This maybe simple, but I just can't figure it out.

On a spreadsheet on Google Sheets, I need for a cell to populate a total when a certain cell contains another variable.

So I want the money spent in 2020 row to only pickup the dollar amount in the "Money" column that contains the date 2020 (or 20 for that matter) in the "Date" column.

enter image description here

Thank you in advanced!

Best Answer

With sumifs

=SUMIFS(E2:E10,A2:A10,">31/12/2019",A2:A10,"<01/01/2021")

With If

=sum(arrayformula(If(year(A2:A10)=$J$2,E2:E10,)))

where A is the Date column, E the Money column, and $J$2 is the 2020