to keep things simple... I'd suggest using a Dynamic Named Range relative to your date value such that you don't end up with a hideously convoluted Frequency calc, I'd also suggest storing the row position in which name is found in the data (to reduce repetition)
With name defined (_Data) the calc would look like:
Formula:
{=SUM((FREQUENCY(IF(INDEX(_Data,$A10,0)=C$9,COLUMN(INDEX(_Data,1,0))),IF(INDEX(_Data,$A10,0)<>C$9,COLUMN(INDEX(_Data,1,0))))>1)+0)}
note: array entry - the { } cannot be applied manually
the above references are relative to the sample file...
Note: should your P value for Name 2 not be 1 on grounds 4th Jan irrelevant? (if you change date to 4-Jan in the attached the result will shift to 2)
Bookmarks