I want to sum the amounts column B that have a receipt date in column A in 2018. I tried using this SUMIF formula for that:
=SUMIF(A2:A4,YEAR(2018),B2:B4)
I expected the result to be Fr. 5 but Google Sheet returns 0. What am I doing wrong?
| 1 | Receipt Date | Amount |
|---|---|---|
| 2 | 03.05.2018 | Fr. 2 |
| 3 | 07.10.2018 | Fr. 3 |
| 4 | 09.02.2019 | Fr. 5 |
(here's a link to this example table in Google Sheets)
Additional info:
- Column A is formatted as date and column B as currency
- The date format in Switzerland is
dd.MM.yyyy - Google Sheet uses
Fr.as a currency symbol for the Swiss Franc, the currency used in Switzerland.