I don't know of a way around the F2:F4. The only possibly helpful thing is that the IF at the end of the formula can be eliminated by ($D$2:$D$10=F2)*(G2:H2))