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

Data Analysis

  • Conditional Formatting Color Scales Examples in Excel
  • How to calculate average last N values in a table in Excel
  • How To Perform and Interpret Regression Analysis in Excel
  • How to calculate current stock or inventory in Excel
  • How to calculate correlation coefficient Correlation in Excel

References

  • Multi-criteria lookup and transpose in Excel
  • How to calculate two-way lookup VLOOKUP in Excel Table
  • INDEX function: Description, Usage, Syntax, Examples and Explanation
  • Excel Advanced Lookup using Index and Match Functions
  • CHOOSE function: Description, Usage, Syntax, Examples and Explanation

Data Validations

  • Excel Data validation number multiple 100
  • Excel Data validation only dates between
  • Excel Data validation require unique number
  • Prevent invalid data entering in specific cells
  • Excel Data validation with conditional list

Summary count with COUNTIF in Excel

by

This tutorial shows Summary count with COUNTIF in Excel using the example below;

Formula

=COUNTIF(range,criteria)

Explanation

When working with data, a common need is to perform summary calculations that show total counts in different ways. For example, total counts by category, color, size, status, etc. The COUNTIF function is a good way to generate these kinds of totals.

Example problem and solution

In the example shown, we have a small set of order data. All orders are for T-shirts, which come in 3 different colors: red, blue, and black.

To the left, we are using COUNTIF to provide a breakdown by color. The formula in cell G5 is:

=COUNTIF(colors,F5)

where “colors” is a named range for cells D5:D11. We are using a named range in this case to make the formula easy to copy down the summary table. Alternately, you could use an absolute reference like so:

=COUNTIF($D$5:$D$11,F5) // absolute address option

How this formula works

The COUNTIF function takes two arguments: a range of cells to count, and the criteria to use for counting. In this case we want to count by color, so we have set up a small table that lists all colors in column F. This allows us to use the the color names in column F both for labels, and for the criteria that goes into COUNTIF as the second argument.

In this case, we are testing equality, so we don’t need to use any logical operators. We can simply enter the named range “color” for range, and a reference to the adjacent cell in column F for the criteria.

Post navigation

Previous Post:

How to use Excel CHOOSE Function

Next Post:

Customize Ribbon In Excel

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

  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • Excel If, Nested If, And/Or Criteria Examples
  • How to use Excel FALSE Function
  • IF function: Description, Usage, Syntax, Examples and Explanation
  • IFNA function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Get work hours between dates in Excel
  • Get days between dates in Excel
  • DATEDIF function: Description, Usage, Syntax, Examples and Explanation
  • Get days, hours, and minutes between dates in Excel
  • Get fiscal quarter from date in Excel

Grouping

  • Group times into 3 hour buckets in Excel
  • Running count group by n size in Excel
  • Group times into unequal buckets in Excel
  • Group arbitrary text values in Excel
  • Calculate conditional mode with criteria in Excel

General

  • How to get Excel workbook path only
  • How to calculate profit margin percentage in Excel
  • Transpose: Switch ‘Rows to Columns’ or ‘Columns to Rows’ in Excel
  • AutoRecover file that was never saved in Excel
  • Convert column number to letter in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning