Hi Neo,

Try using below formula:-
Formula: copy to clipboard
=IFERROR(IF(MATCH(I8,B$8:B$100,0),AVERAGE(OFFSET($B$7,MATCH(I8,$B$8:$B$16,0),$K$6,J8,1)),""),"")


see attached:- Example(1).xlsx

Regards,
DILIPandey
<click on below * if this helps>