Quote Originally Posted by FDibbins View Post
Edit: In J2, copied down, use this to pull out unique PRV NUM's...
=IFERROR(INDEX($B$2:$B$1000,MATCH(0,INDEX(COUNTIF($J$1:J1,$B$2:$B$1000),0,0),0)),"")

Then move H1:I1 to H2:I2 and use this in L2, copied down (yur can use K2 if you want)...
=IF(J2="","",SUMPRODUCT(--($B$2:$B$150000=J2),--($D$2:$D$150000>=$H$2),--($D$2:$D$150000<=$I$2),(($E$2:$E$150000="0100")+($E$2:$E$150000="0200")),$F$2:$F$150000))
The 1st part will extract all unique entries in column B, when it runs out of unique entries, it "would" return an error msg, so the iferror() takes care of that

The 2nd part takes your sumproduct, and bases it off the J2 values instead