Try

in B17
=OFFSET($B$9,MATCH(C4,B9:B13,1),(MATCH(C2,B7:I7,1)-1)/2*2+1)

Check the results, I only checked a few of them.