To count the number of times that data in two or more ranges of cells meets multiple criteria, use the SUMPRODUCT function. SUMPRODUCT counts only cases where the criterion is met for each range at the same time, such as in the same row.
Counting records using multiple conditions with SUMPRODUCT
The syntax used for the SUMPRODUCT function when it is used to count multiple criteria differs from the syntax the function normally uses:
The following example counts the rows in the data sample, cells E1 through G6, that meet the specified criteria for all three columns of data. Excel counts the rows if they meet the following criteria:
Because this is a non-standard use of the SUMPRODUCT function, the function cannot be entered using the Formula Builder. It must be typed into the target cell.