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

Data Analysis

  • How To Filter Data in Excel
  • How to sum a total in multiple Excel tables
  • How To Compare Two Lists in Excel
  • How To Sort One Column or Multiple Columns in Excel
  • How to Create Column Chart in Excel

References

  • Left Lookup in Excel
  • MATCH function: Description, Usage, Syntax, Examples and Explanation
  • Find Closest Match in Excel Using INDEX, MATCH, ABS and MIN functions
  • How to use Excel OFFSET function
  • Complete List of Excel Lookup and Reference Functions, References and Examples

Data Validations

  • Excel Data validation must begin with
  • How To Create Drop-down List in Excel
  • Data validation must not exist in list
  • Excel Data validation require unique number
  • Excel Data validation no punctuation

Countif function in Excel

by

COUNTIF is one of the statistical functions, it is used to count the number of cells that meet a criterion

This chapter covers  many easy to follow COUNTIF examples like Numbers, Text, Booleans, Errors and ‘Or Criteria’.

Numbers

1. The COUNTIF function below counts the number of cells that contain the value 20.

2. The following COUNTIF function gives the exact same result. It counts the number of cells that are equal to the value in cell C1.

3. The COUNTIF function below counts the number of cells that are greater than or equal to 10.

4. The following COUNTIF function gives the exact same result. It uses the & operator to join the ‘greater than or equal to’ symbol and the value in cell C1.

5. The COUNTIF function below counts the number of cells that are not equal to 7.

6. The COUNTIF functions below count the number of cells that are equal to 3 or 7.

Worked Example:   Excel Data validation unique values only

7. The COUNTIF function below counts the number of cells that are less than the average of the values (8.2).

Text

1. The COUNTIF function below counts the number of cells that contain exactly star.

2. The COUNTIF function below counts the number of cells that contain exactly star + 1 character. A question mark (?) matches exactly one character.

3. The COUNTIF function below counts the number of cells that contain exactly star + a series of zero or more characters. An asterisk (*) matches a series of zero or more characters.

4. The COUNTIF function below counts the number of cells that contain star in any way. No matter what is before or after star, this function finds all the cells that contain star in any way.

5. The COUNTIF function below counts the number of cells that contain text.

Note: visit our page about counting cells with text for more information and examples.

Booleans

1. The COUNTIF function below counts the number of cells that contain the Boolean TRUE.

Worked Example:   Highlight missing values in Excel

2. The COUNTIF function below counts the number of cells that contain the Boolean FALSE.

3. The COUNTIF functions below count the number of cells that contain the Boolean TRUE or FALSE.

Errors

1. You can also use the COUNTIF function to count specific errors in Excel. For example, count the number of cells that contain the #NAME? error.

2. The array formula below counts the total number of errors in a range of cells.

Note: finish an array formula by pressing CTRL + SHIFT + ENTER. Excel adds the curly braces {}. Visit our page about Counting Errors for detailed instructions on how to create this array formula.

Or Criteria

Counting with Or criteria in Excel can be tricky.

1. The COUNTIF functions below count the number of cells that contain Google or Facebook (one column).

Worked Example:   Count total matches in two ranges in Excel

2. However, if you want to count the number of rows that contain Google or Stanford (two columns), you cannot simply use the COUNTIF function twice (see the picture below).

Note: rows that contain Google and Stanford are counted twice, but they should only be counted once. 4 is the answer we are looking for.

3. The array formula below does the trick.

Note: finish an array formula by pressing CTRL + SHIFT + ENTER. Excel adds the curly braces {}. Visit our page about Counting with Or Criteria for detailed instructions on how to create this array formula and become an Excel pro.

4. Counting with And criteria is a lot easier. For example, to count the number of rows that contain Google andStanford, simply use the COUNTIFS function (with the letter S at the end).

Note: the COUNTIFS function in Excel counts cells based on two or more criteria.

Post navigation

Previous Post:

Understanding Anova in Excel

Next Post:

Excel Standard Deviation

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

  • IF, AND, OR and NOT Functions Examples in Excel
  • IFS function: Description, Usage, Syntax, Examples and Explanation
  • AND function: Description, Usage, Syntax, Examples and Explanation
  • IF with boolean logic in Excel
  • FALSE function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Convert date to Julian format in Excel
  • How to calculate nth day of week in month in Excel
  • Basic Overtime Calculation Formula in Excel
  • How to calculate next anniversary date or birthday in Excel
  • YEARFRAC function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Group arbitrary text values in Excel
  • Group times into 3 hour buckets in Excel
  • Calculate conditional mode with criteria in Excel
  • Map inputs to arbitrary values in Excel
  • Map text to numbers in Excel

General

  • How to calculate percent change in Excel
  • How to calculate percent of goal in Excel
  • Zoom Worksheet in Excel
  • How to Create Calendar in Excel
  • How to fill cell ranges with random number from fixed set of options in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning