Control+shift+enter, not just enter:
=AVERAGE(IF(1-ISNUMBER(MATCH($D3:$D$501,{5.2,6.1},0)),$I$3:$I$501))
This formula hard-codes the criteria to exclude.
However, you can also have a range housing the critera to exclude and name this range ExcludeList. This set up allows you to invoke...
=AVERAGE(IF(1-ISNUMBER(MATCH($D3:$D$501,ExcludeList,0)),$I$3:$I$501))
Note. If D-range house formulas, you might need to invoke something like...
=AVERAGE(IF(1-ISNUMBER(MATCH(ROUND($D3:$D$501,1),ExcludeList,0)),$I$3:$I$501))
The latter two formulas also require control+shift+enter.