Use Excel's SUMPRODUCT Function to Count Multiple Criteria

Advanced calculator detail

Mario GutiƩrrez / Getty Images

When you want to count the number of times data in two or more ranges of cells meets multiple criteria, use the SUMPRODUCT function. SUMPRODUCT only counts instances where the criterion for each range is met simultaneously, such as in the same row.

Note: The information in this article applies to Excel 2019, Excel 2016, Excel 2013, Excel 2010, Excel 2007, Excel Online, Excel for Mac, Excel for Android, Excel for iPhone, and Excel for iPad.

How to use the SUMPRODUCT Function

The syntax used for the SUMPRODUCT function when it is being used to count multiple criteria is different than normally used by the function:

=SUMPRODUCT(Criteria_range-1,Criteria-1)*(Criteria_range-2,Criteria-2)*...)
  • Criteria_range: The group of cells the function is to search.
  • Criteria: Determines whether the cell is to be counted or not.
Screenshot of Excel showing the SUMPRODUCT syntax

In our example, we will count the rows in the data sample, cells E1 to G6, that meet specified criteria for all three columns of data. The rows will be counted if they meet the following criteria:

  • Column E: If the number is less than or equal to 2.
  • Column F: If the number is equal to 4.
  • Column G: If the number is greater than or equal to 5.

Use Excel's SUMPRODUCT Function 

Since 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.

  1. Enter the example data, as shown in the screenshot provided above, into a blank Excel worksheet.

  2. Select cell F8. This is where the function results will display.

  3. Type the following into cell F8:

    =SUMPRODUCT((E1:E6<=5)*(F1:F6=4)*(G1:G6>=5))

    and press Enter.

  4. The answer 2 appears in cell F8 since there are only two rows (rows 1 and 5) that meet all three of the criteria listed above.

    Screenshot of Excel showing the function result

The complete function appears in the formula bar above the worksheet when you select cell F8.