How to Use COUNTIFS Function with Multiple Criteria in Excel?

The sample dataset has the Order Date, Category, Product, Quantity, and Unit Price columns. We’ll use COUNTIFS with criteria in it.

The Dataset


Example 1 – Applying the COUNTIFS Function with a Constant Array

We want to count the Cookies, Bars, and Crackers sales.

Steps:

  • Use the following formula in the merged cell B21:C21.
=SUM(COUNTIFS($C$5:$C$18,{"Cookies","Bars","Crackers"}))

Applying SUM and COUNTIFS Functions

  • Press Enter.

Result after Using COUNTIFS with Constant Array


Example 2 – Using the COUNTIFS Function with Multiple Criteria for Different Values and Dates

Case 2.1 – Between Two Values

We want count the number of products where the sold Quantity exceeds 50 but is below 100.

Steps:

  • Use the following formula in the merged cells B21:E21.
=COUNTIFS($E$5:$E$18,">50", $E$5:$E$18,"<100")

Using COUNTIFS function for Values

  • Hit Enter.

Output after Using COUNTIFS for Values and Dates


Case 2.2 – Between Two Dates

We’ll count the sales between 11/10/2021 to 15/10/2021.

Steps:

  • Use the following formula in the merged cells B21:C21.
=COUNTIFS($B$5:$B$18,">="&DATE(2021,10,10),$B$5:$B$18,"<="&DATE(2021,10,20))

 Using COUNTIFS with Multiple Criteria for Dates

  • Hit Enter.

The Output after Using COUNTIFS for Dates

Read More: How to Use COUNTIFS with Date Range and Text in Excel


Example 3 – Inserting the COUNTIFS Function with Multiple Criteria in Multiple Columns

We’ll count the sales of products (Chocolate Chip) based on category (Cookies) and a specific quantity (>50).

Steps:

  • List the criteria in C20, C21, and C22.
  • Use the following formula in the merged cells D21:D22.
=COUNTIFS($C$5:$C$18,C20,D5:D18,C21,$E$5:$E$18,C22)

Inserting COUNTIFS with Multiple Criteria in Multiple Columns

  • Hit Enter.

The result after Using COUNTIFS for Multiple Columns

Read More: How to Use COUNTIFS to Count Across Multiple Columns in Excel


Example 4 – Using the COUNTIFS Function with Wildcard Characters

We can use Wildcard Characters such as “*”, “?” to check for the number of products out of stock.

Dataset for Wildcard Character

Steps:

  • Use the following formula in the merged cells B21:D21.
=COUNTIFS($D$5:$D$18,"*",$G$5:$G$18,"<>"&"")

 Using COUNTIFS with Wildcard Characters

  • Hit Enter.

The Outcome After Using Wildcard Characters


Practice Section

You can download the Excel file and practice the methods.

Practice Section


Download the Practice Workbook


Excel COUNTIFS Multiple Criteria: Knowledge Hub


<< Go Back to Excel COUNTIFS Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Maruf Islam
Maruf Islam

MARUF ISLAM is an excellent marine engineer who loves working with Excel and diving into VBA programming. For him, programming is like a superhero tool that saves time when dealing with data, files, and the internet. His skills go beyond the basics, including ABACUS, AutoCAD, Rhinoceros, Maxsurf, and Hydromax. He got his B.Sc in Naval Architecture & Marine Engineering from BUET, and now he's switched gears, working as a content developer. In this role, he creates techy content... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo