Are you certain you have MAXIFS? As I understand it is not available in 2016 unless that is Office 365.

For MAXIFS
Formula: copy to clipboard
=MAXIFS(Sheet2!$D:$D,Sheet2!$A:$A,">="&A3,Sheet2!$A:$A,"<="&B3)