COUNTIF based on multiple criteria in Excel and Google Sheets

=SUMPRODUCT(COUNTIF(A:A,B:B))

A:A = Data ranges; B:B = criteria ranges

Check below for a detailed explanation with pictures and how to use formulas in Excel and Google Sheets.

COUNTIF based on multiple criteria in Excel

How to COUNTIF based on multiple criteria in Excel?
COUNTIF based on multiple criteria in Excel

COUNTIF BASED ON MULTIPLE CRITERIA — EXCEL FORMULA AND EXAMPLE

=SUMPRODUCT(COUNTIF(A:A,B:B))

💡 You can also use range instead of the column

COUNTIF based on multiple criteria in Google Sheets

How to COUNTIF based on multiple criteria in Google Sheets?
Countif based on multiple criteria in Google Sheets

COUNTIF BASED ON MULTIPLE CRITERIA — GOOGLE SHEETS FORMULA AND EXAMPLE

=SUMPRODUCT(COUNTIF(A:A,B:B))

💡 You can also use range instead of the column

Other useful "COUNT FUNCTIONS: TEXT BASED CRITERIA" formulas in Excel and Google SheetsOthers FormulasDate and time functionsNumber based criteriaExtract functions