I have the following formula which checks the dates in column B are in a date period and then counts the unique numbers in column A and works fine.
Range("H8").Select
=SUMPRODUCT(IF((B2:B5<=J5)*(B2:B5>=I5), 1/COUNTIFS(B2:B5, "<="&J5, B2:B5, ">="&I5, A2:A5, A2:A5), 0))
However, I need...