SUMIFS using date function
I have a table containing Dates, Categories and Amounts. From it I would like to create a second table containing the total amount in various categories over a number of years, something like this :-
I can do it in a fairly hard-coded way for each year using something like SUMIFS($Amount,$Category,"="&$A7,$Date,">="&"1/1/2020",$Date,"<="&"31/12/2020"), but to avoid having to edit that for each year I'd like to do something like SUMIFS($Amount,$Category,"="&$A7,YEAR($Date),"="&C$1). Sadly, that gives me the dreaded "SUMIFS requires that all range arguments are the same size.
Any ideas would be greatly appreciated.
iMac, macOS 10.13