I have a sheet that records transactions on a daily basis and another that gives a summary. I need a formula that sums values in a column in the transaction sheet based on the month it was recorded. The month needed is from another cell. I did a google search but none of the formulas other people have used is working for me. I have tried:

=SUM(IF(MONTH(Table5[Date])=Reports!C22,Table5[Income],0)) but i get #VALUE! error. i have tried sumif and sumproduct but i always get 0 or the same error.

the dates are in the "Date" column of table 5; the values i need to sum are in the "Income" column of Table 5; and the month i need to filter is in cell C22. What am i doing wrong and what is the solution?

Regards