Skip to content

Latest commit

 

History

History
45 lines (26 loc) · 1.3 KB

Excel.WorksheetFunction.CountIf.md

File metadata and controls

45 lines (26 loc) · 1.3 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
WorksheetFunction.CountIf method (Excel)
vbaxl10.chm137242
vbaxl10.chm137242
Excel.WorksheetFunction.CountIf
d0251b63-cc9e-a58c-1862-adbd58004126
05/22/2019
medium

WorksheetFunction.CountIf method (Excel)

Counts the number of cells within a range that meet the given criteria.

Syntax

expression.CountIf (Arg1, Arg2)

expression A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data type Description
Arg1 Required Range The range of cells from which you want to count cells.
Arg2 Required Variant The criteria in the form of a number, expression, cell reference, or text that defines which cells will be counted. For example, criteria can be expressed as 32, "32", ">32", "apples", or B4.

Return value

Double

Remarks

Use the wildcard characters, question mark (?) and asterisk (*), for the criteria. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.

[!includeSupport and feedback]