The E2 cell input function in the Red box area returns the number of times this person appears on the corresponding date
Multiplying two equations means that two conditions are met, and the function will count the true number in an array of true and false, that is, the number of colleagues who meet the condition
Right-click on the cell, in the pop-up menu click Copy and then do a click on the large box area, paste, the formula
If you use the SUM function to achieve the same effect, but the final completion of the formula input, you need to press ctrl+shift+ enter to get the return value
When you finish pressing ctrl+shift+ carriage return you can see the formula in the edit bar with a pair of curly braces, which is the symbol of the array formula
You can also implement conditional statistics with the DCount function, but you need to manually set a condition area as the third parameter
Or you can get the same result by automatically filtering, then selecting the B-column data range, and then locating the visible cells, and looking at the lower-right corner count.
Note: When using DCount, the second argument specifies the cell in the upper-left corner of the criteria range