CountIfS

Syntax

CountIfS(Range1, Criteria1, Range2, Criteria2, …)

Parameters

Range1, Range2, …, RangeN. The range of cells checked for correspondence to the specified condition.

NOTE. Ranges must have equal size and form.

Criteria1, Criteria2, …, CriteriaN. The condition that determines, which cells must be taken into account. The condition may be a number, expression, cell hyperlink, text, or function.

NOTE. All text conditions and conditions with logical mathematical characters must be enclosed in double quotation marks (").

Description

It returns the number of cells that satisfy the specified set of conditions.

Example

Formula Result Description
=CountIfS(A0:A3, ">0", B0:B3, "<0") 1 The number of cells in the A0:A3 range provided that cell values are positive, and in the B0:B3 range provided that cell values are negative. The A0:A3 range contains the following numbers: -2, 6, 4, -8; the B0:B3 range contains the following numbers: -6, 4, -9, 5.

See also:

Function Wizard │ Mathematical Functions