I have a table with dates (column A) and returns (column B). In cell A1, I have a specific year and would like to compute the geomean of the returns in column B that matches the criteria in cell A1 (year 2016). I was able to get a static geomean forrmula (=SUMPRODUCT(GEOMEAN(B3:B7+1))-1), but I am now looking for a formula that can return the new geomean everytime a new date that matches the criteria in cell A1 is entered in column A. For example, if data in A8 is 01.06.2017, the value should remain the same. But if value is 03.03.2016, the formula should add the value in B8. Basically, I am looking for a formula similar to average if, something similar to =AVERAGE(IF(YEAR(Change!A3:A10000)=Return!$A$3,Change!B3:B10000))


A B C D
1 2016
2
3 01.02.2016 (1.3%)
4 01.03.2016 1.1%
5 01.04.2016 0.5%
6 01.05.2016 0.6%
7 01.06.2016 (0.3%)
8