How To Use The Excel COUNTIFS Function - Exceljet PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Cart Login

Quick, clean, and to the point


Training Videos Functions Formulas Shortcuts Blog

Search... Search

Excel COUNTIFS Function


Topics

Video training
Function Guide
Formula Examp
Formula
Criteria
Excel Shortcuts
Pivot Tables
101 Excel
Functions
Excel Tables
INDEX and
Summary  MATCH
The Excel COUNTIFS function returns the count of cells Excel Charts
that meet one or more criteria. COUNTIFS can be used Conditional
with criteria based on dates, numbers, text, and other Formatting
conditions. COUNTIFS supports logical operators (>,<, Custom
<>,=) and wildcards (*,?) for partial matching. Number
Formats
Data Validation
Purpose  Nested IF
examples
Count cells that match multiple criteria
Formula
challenges
Return value  How-to videos
Excel glossary
The number of times criteria are met Excel people
Excel books
Recent
Syntax 
comments
=COUNTIFS (range1, criteria1, [range2], [criteria2], ...)
Key functions

Arguments  IF function
VLOOKUP funct
range1 - The rst range to evaulate. SUMIFS
criteria1 - The criteria to use on range1. function
COUNTIFS
range2 - [optional] The second range to evaluate.
function
criteria2 - [optional] The criteria to use on range2. INDEX
function
MATCH
Usage notes  function
SUMPRODUCT
COUNTIFS counts the number of cells in a range that
function
match supplied criteria. Unlike the COUNTIF function,
COUNTIFS can apply more than one set of criteria, with
more than one range. Ranges and criteria are applied in
pairs, and only the rst pair is required. For each
additional criteria, you must supply another Hi - I'm Da
range/criteria pairs. Up to 127 range/criteria pairs are and I
allowed. run
Exceljet
Examples with my
wife, Lisa. Our goal is
With the example shown, COUNTIFS can be used to to help you work
count records using 2 criteria as follows: faster in Excel. We
create short videos,
= COUNTIFS(C5:C14,"red",D5:D14,"TX") // and clear examples of
red and TX formulas, functions,
= COUNTIFS(C5:C14,"red",F5:F14,">20") // pivot tables,
red and >20 conditional
formatting, and
Notes: charts. Read more.

Each additional range must have the same number


of rows and columns as range1, but ranges do not
need to be adjacent. If you supply ranges with a
mismatch, you'll get a #VALUE error.

Non-numeric criteria needs to be enclosed in


double quotes but numeric criteria does not. For
example: 100, "100", ">32", "jim", or A1 (where A1
contains a number).

The wildcard characters ? and * can be used in


criteria. A question mark matches any one
character and an asterisk matches any sequence of
characters.

To nd a literal question mark or asterisk, use a


tilde (~) in front question mark or asterisk (i.e. ~?,
~*).

COUNTIFS formula examples

Course completion
summary with criteria
This example illustrates
one way to summarize
course completion data
using a criteria, in this case "group". In the example
shown, the formula in I4 is:
=COUNTIFS($B$4:$B$11,$H4,D$4:D$11,"
<>")/COUNTIFS...

Count numbers by range


with COUNTIFS
To count numeric data by
range or grouping, you
can build a summary
table and use COUNTIFS to count values at each
threshold. In the example show, we have a list of names
and ages and are using the COUNTIFs function to...

Course completion status summary


To build a summary to show course completion status
based on a data log, you can use the COUNTIFS function
together with the IF function. In the example shown, the
formula in G4 is:

=IF(COUNTIFS(name,$F4,course,G$3...

Highlight duplicate rows


Excel contains a built-in
preset for highlighting
duplicate values with
conditional formatting,
but it only works at the cell level. If you want to highlight
entire rows that are duplicates you'll need to use your
own...

Count if two criteria


match
If you want to count rows
where two (or more)
criteria match, you can
use a formula based on the COUNTIFS function. In the
example shown, we want to count the number of orders
with a color of "blue" and a quantity > 15...

Summary count by
month with COUNTIFS
To create a summary
count by month, you can
use the COUNTIFS
function and the EDATE
function with two
criteria. In the example shown, the formula in G5 is:
=COUNTIFS(dates,">="&F5,dates,"<...

Count cells not equal to


x or y
To count cells not equal
to this or that, you can
use the COUNTIFS
function with multiple criteria. In the example shown,
there is a simple list of colors in column B. There are 6
cells total with a color, and a few...

COUNTIFS with multiple


criteria and OR logic
To count with multiple
criteria and OR logic, you
can use the COUNTIFS
function with an array constant. In the example shown,
the formula in H6 is: =SUM(COUNTIFS(D4:D11,
{"complete","pending"}))...

Summary count of non-


blank categories
To build a summary
count of non-blank
categories, you can use
the COUNTIFS function. In the example show, the
formula in G6 is:
=COUNTIFS($B$5:$B$11,F6,$C$5:$C$11,"<>") How this
formula works This...

Count cells between two


numbers
To count the number of
cells that contain values
between two numbers in
a range of cells, you can use the COUNTIFS function. In
the generic form of the formula (above) range represents
a range of cells that contain...

COUNTIFS with variable


table column
To use COUNTIFS with a
variable table column,
you can use INDEX and
MATCH to nd and retrieve the column for COUNTIFS. In
the example shown, the formula in H5 is:
=COUNTIFS(INDEX(Table1,0,MATCH(G5,Table1[#Headers],0...

Count times in a speci c


range
To count times that
occur within a certain
range, you can use the
COUNTIFs function. In the example shown, the formula
in E7 is: =COUNTIFS(B5:B11,">="&E5,B5:B11,"<"&E6)
How this...

Count dates in current


month
To count dates in the
current month, you can
use a formula based on
the COUNTIFS or SUMPRODUCT function as explained
below. In the example shown above, the formula in E7 is:
=COUNTIFS(dates,">="&...

Two-way summary count


with COUNTIFS
To build a two-way
summary count (i.e.
summarizing by rows
and columns) you can use the COUNTIFS function. In the
example shown, the formula in G5 is:
=COUNTIFS(dept,$F5,class,G$4) How this formula works
The...

Rank if formula
To rank items in a list
using one or more
criteria, you can use the
COUNTIFS function. In
the example shown, the formula in E5 is:
=COUNTIFS(groups,C5,scores,">"&D5)+1 where "groups"
is the named...
Related videos

How to build a simple


summary table
Although Pivot Tables are
fantastic tools for
summarizing data,
sometimes you just want a
simple, lightweight solution based on formulas. The good
news is you can build your own summaries using
functions like COUNTIF and SUMIF. See how in this 3
minute video.

Related functions 
Excel COUNTIF Function
COUNTIF is a function to
count cells that meet a
single criteria. COUNTIF
can be used to count
cells with dates,
numbers, and text that match speci c criteria. The
COUNTIF function supports logical operators (>,...

Good links 
Microsoft COUNTIFS function documentation

Excel Formula
Training
Formulas are the key to getting
things done in Excel. In this
accelerated training, you'll
learn how to use formulas to
manipulate text, work with
dates and times, lookup values with VLOOKUP and
INDEX & MATCH, count and sum with criteria,
dynamically rank values, and create dynamic
ranges. You'll also learn how to troubleshoot, trace
errors, and x problems. Instant access. See
details here.

500 Formula Examples, thoughtfully explained.

Download 200+ Excel Shortcuts


Get over 200 Excel shortcuts for Windows and
Mac in one handy PDF.

email address Get the PDF


I’ve actually been gorging on your articles and videos every
night this week. Thank you so very much for making the
site!! - Brenda

Excel video training


Quick, clean, and to the
point.

Learn more

© 2012-2019 Exceljet. Terms of use

Home About Blog Contact Feedback

You might also like