Home > Formulas > Count > Guide

Your Guide to Excel Count Formulas

Debra Dalgleish - Contextures

What do you need to count in Excel? Numbers? Specific entries in a list? Entries in a date range? Here's my guide to Excel's counting functions and formulas, to help you find what you need!

Count Specific Items - COUNTIF or COUNTIFS

Video: 7 Ways to Count in Excel

First, here's a quick overview of 7 ways to get a total count of cells in Excel.

Excel Counting Formulas: Overview

This guide covers a wide variety of Excel counting functions and formulas -- from simple counts, to formulas with advanced multi-condition criteria.

There are brief notes and examples in the sections below.

Each section has links to detailed tutorials, where I have written steps, screenshots, and step-by-step videos, along with sample Excel files that you can download.

Get the Sample File

  • Count Formulas: Get the Excel Count Formulas workbook, with the examples from this page. The zipped file is in xlsx format, and does not contain any macros.

1) Basic Counting Functions

For many Excel projects, these 3 basic counting functions are all you need.

  • COUNT – Count numbers and dates in a range
    • There are 2 number/date cells in the screenshot below
  • COUNTA – Count all non-empty cells (text and numbers)
    • There are 3 cells with data in the screenshot below
  • COUNTBLANK – Count empty cells only
    • There is 1 empty cell in the screenshot below

📌 Learn more about these 3 counting functions, with examples and sample files.

Count All Data - COUNTA

2) Counting Specific Items in a List

For some Excel projects, you need to count cells based on specific criteria (conditions). The following two functions let you COUNT cells, IF specific conditions are met.

  • COUNTIF – Count cells that meet a single condition
    • There are 2 orders with an exact match for "Pen"
  • COUNTIFS – Count cells that meet one or more conditions
    • There is 1 order with an exact match for "Pen" AND quantity greater than or equal to 6

Count Specific Items - COUNTIF or COUNTIFS

📌 Learn more:

3) Count for Date or Number Range

For some Excel projects, you need to count cells based on a specific range of numbers, or range of dates. In the screen shot below, I used COUNTIFS formulas to count the numbers and dates in the specified range

  • Date Range – Count based on minimum and/or maximum dates
    • There are 3 orders with a date in the date range
    • =COUNTIFS(tblRange[Date],">="&E3, tblRange[Date],"<="&F3)
  • Number Range – Count based on minimum and/or maximum numbers
    • There are 2 orders with a quantity in the number range
    • =COUNTIFS(tblRange[Qty],">="&E8, tblRange[Qty],"<="&F8)

Count Specific Items - COUNTIF or COUNTIFS

📌 Learn more:

4) Count Data in Filtered List

After you filter the rows in a list, you can use the the following two functions to count the visible rows in the filtered data.

  • SUBTOTAL - counts visible numbers or all visible data
    • There are 2 visible orders in column C
    • =SUBTOTAL(102,C3:C8)
  • AGGREGATE - counts visible numbers or all visible data; has more options and functions than SUBTOTAL
    • There are 2 visible orders in column D
    • =AGGREGATE(2,3,D3:D8)

Count visible items in filtered list SUBTOTAL or AGGREGATE

Note: The COUNT function, in column B, counts all the numbers - visible or hidden.

  • =COUNT(B3:B8)

Tip: I recommend using the AGGREGATE function, which gives you more control over the formula results.

📌 Learn more:

Get the Sample File

  • Count Formulas: Get the Excel Count Formulas workbook, with the examples from this page. The zipped file is in xlsx format, and does not contain any macros.

Get Monthly Excel Tips!

Don't miss my monthly Excel newsletter! You'll get quick tips, article links, and a bit of fun. Add your email, and click Sign Up.

Next, when you get my reply, click the Confirm button. I add this step to protect you from spam!

More Excel Functions

Statistical Functions

Subtotal Feature

Sum Functions

Combine Text & Numbers

 

 

Last updated: March 23, 2025 2:22 PM