23.08.2023 Views

CFI-Excel-eBook

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The Corporate Finance Institute Excel

COUNTIF

Count cells that match multiple

criteria

range1 criteria1 range2

criteria2

What is the COUNTIF Function?

The COUNTIF function will count the number of cells that meet a specific

criterion. The function is categorized under Statistical functions.

In financial analysis, the COUNTIF function is quite helpful. Take for example

when we need to count the number of times a salesperson exceeded his

target. We can do this by using COUNTIF.

Formula

=COUNTIF(Range, criteria)

The COUNTIF function uses only one argument:

1. Range (required argument) – It defines one or several cells that we wish to

count. The range of cells are those cells that will be tested against the given

criteria and counted if the criteria are satisfied.

2. Criteria – It is a condition defined by us. It is tested against each of the

cells in the supplied range.

The given criteria can be any of the following:

1. It is a numeric value. It can be an integer, decimal, date, time, or logical

value.

2. A text string. It may include wildcards. Wildcards can be a ? (question mark)

or an * (asterisk). A ? matches any single character, whereas, * matches any

sequence of characters. If we wish to actually find the ? (question mark) or

* (asterisk) character, we need to type the ~ symbol before this character in

our search.

How to use the COUNTIF Function in Excel?

As a worksheet function, the COUNTIF Function can be entered as part of a

formula in a cell of a worksheet.

To understand the uses of the function, let us consider a few examples:

corporatefinanceinstitute.com

191

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!