Try in J8 the array formula and copy down
Formula: copy to clipboard
=IF(ISNUMBER(F8),$K$8/MAX(--($D$8:$D$103=D8)*$G$8:$G$103),"")