Is there a way to create a count of nonblank cells within a matrix based on columns header and row?

Viewed 44

I have data currently formatted like Table 1 below. I need to create a formula to populate the matrix in Table 2. Essentially I need to count the non-blank cells if the column and row match. There are duplicates in the columns so I need to aggregate these together. I already have the rows and columns of Table 2 created. Any ideas on the easiest way to do this? I already tried a mix of counta and countif formulas without any luck.

Table 1

1/4/2021 1/4/2021 1/11/2021 1/11/2021
Person A V O
Person B V V V V
Person C V O

Table 2

1/4/2021 1/11/2021
Person A 1 1
Person B 2 2
Person C 1 1
1 Answers

You can try SUMPRODUCT().

=SUMPRODUCT(($B$2:$E$4<>"")*($A$2:$A$4=$E10)*($B$1:$E$1=F$9))

enter image description here

Reference:

Related