Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Remove Duplicates Example in Excel
  • Conflicting Multiple Conditional Formatting Rules in Excel
  • Randomize/ Shuffle List in Excel
  • Understanding Anova in Excel
  • Chart Axes in Excel

References

  • How to use Excel TRANSPOSE Function
  • How to use Excel MMULT Function
  • Offset in Excel
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • Count unique text values with criteria

Data Validations

  • Excel Data validation with conditional list
  • Excel Data validation number multiple 100
  • Excel Data validation must begin with
  • Excel Data validation don’t exceed total
  • Prevent invalid data entering in specific cells

COUNTIFS function: Description, Usage, Syntax, Examples and Explanation

by

What is COUNTIFS function in Excel?

COUNTIFS function is one of Statistical functions in Microsoft Excel applies criteria to cells across multiple ranges and counts the number of times all criteria are met.

Syntax of COUNTIFS function

COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…)

The COUNTIFS function syntax has the following arguments:

  • criteria_range1    Required. The first range in which to evaluate the associated criteria.
  • criteria1    Required. The criteria in the form of a number, expression, cell reference, or text that define which cells will be counted. For example, criteria can be expressed as 32, “>32”, B4, “apples”, or “32”.
  • criteria_range2, criteria2, …    Optional. Additional ranges and their associated criteria. Up to 127 range/criteria pairs are allowed.

Important: Each additional range must have the same number of rows and columns as the criteria_range1argument. The ranges do not have to be adjacent to each other.

Worked Example:   Count cells that contain text in Excel

COUNTIFS formula explanation

  • Each range’s criteria is applied one cell at a time. If all of the first cells meet their associated criteria, the count increases by 1. If all of the second cells meet their associated criteria, the count increases by 1 again, and so on until all of the cells are evaluated.
  • If the criteria argument is a reference to an empty cell, the COUNTIFS function treats the empty cell as a 0 value.
  • You can use the wildcard characters— the question mark (?) and asterisk (*) — in criteria. A question mark matches any single character, and an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
Worked Example:   Count cells that do not contain in Excel

Examples of COUNTIFS function

Example 1

Data
1 5/1/2011
2 5/2/2011
3 5/3/2011
4 5/4/2011
5 5/5/2011
6 5/6/2011
Formula Description Result
=COUNTIFS(A2:A7,”<6″,A2:A7,”>1″) Counts how many numbers between 1 and 6 (not including 1 and 6) are contained in cells A2 through A7. 4
=COUNTIFS(A2:A7, “<5″,B2:B7,”<5/3/2011”) Counts how many rows have numbers that are less than 5 in cells A2 through A7, and also have dates that are are earlier than 5/3/2011 in cells B2 through B7. 2
=COUNTIFS(A2:A7, “<” & A6,B2:B7,”<” & B4) Same description as the previous example, but using cell references instead of constants in the criteria. 2

Example 2

Steps to follow:

1. Open a new Excel worksheet.

2. Copy data in the following table below and paste it in cell A1

Worked Example:   Count cells not equal to many things in Excel

Note: For formulas to show results, select them, press F2 key on your keyboard and then press Enter.

You can adjust the column widths to see all the data, if need be.

Salesperson Exceeded Q1 quota Exceeded Q2 quota Exceeded Q3 quota
Davidoski Yes No No
Burke Yes Yes No
Sundaram Yes Yes Yes
Levitan No Yes Yes
Formula Description Result
=COUNTIFS(B2:D2,”=Yes”) Counts how many times Davidoski exceeded a sales quota for periods Q1, Q2, and Q3 (only in Q1). 1
=COUNTIFS(B2:B5,”=Yes”,C2:C5,”=Yes”) Counts how many salespeople exceeded both their Q1 and Q2 quotas (Burke and Sundaram). 2
=COUNTIFS(B5:D5,”=Yes”,B3:D3,”=Yes”) Counts how many times Levitan and Burke exceeded the same quota for periods Q1, Q2, and Q3 (only in Q2). 1

Post navigation

Previous Post:

COUNTIF function: Description, Usage, Syntax, Examples and Explanation

Next Post:

COVARIANCE.P function: Description, Usage, Syntax, Examples and Explanation

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • How to return blank in place of #DIV/0! error in Excel
  • Not Equal To ‘<>‘ operator in Excel
  • TRUE function: Description, Usage, Syntax, Examples and Explanation
  • Invoice status with nested if in Excel
  • IFNA function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Get work hours between dates and times in Excel
  • NETWORKDAYS.INTL function: Description, Usage, Syntax, Examples and Explanation
  • Convert date string to date time in Excel
  • Add business days to date in Excel
  • How to determine year is a leap year in Excel

Grouping

  • Categorize text with keywords in Excel
  • How to randomly assign people to groups in Excel
  • How to randomly assign data to groups in Excel
  • Group numbers at uneven intervals in Excel
  • Map inputs to arbitrary values in Excel

General

  • AutoFit Column Width, AutoFit Row Height in Excel
  • How to count total columns in range in Excel
  • Basic error trapping example in Excel
  • How to calculate percent of students absent in Excel
  • Basic numeric sort formula in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning