Based on the formula you're using, you're looking for the average of the days where reporting period is p 1, p 2, p 3, etc & site is A,b,c, etc ?

If that's the case, try replacing your sumproduct formula with:

=AVERAGEIFS(RangAMean,RangARP,$B2,RangASite,$E2)

Updating the range references as necessary