Averageif between dates

Enter this formula: =AVERAGE(IF((A2:A15>=E1)*(A2:A15<=E2),B2:B15)) into a specific blank cell, and then press Ctrl + Shift + Enter keys together to get the correct result, see screenshot:

https://www.extendoffice.com/documents/excel/2535-excel-average-between-two-dates.html