COUNTIF函数公式语法与应用实例.pdfVIP

  • 0
  • 0
  • 约2.14千字
  • 约 4页
  • 2026-02-09 发布于北京
  • 举报

COUNTIF()函数

COUNTIF()函数的语法和用法。

说明

COUNTIF函数对区域中满足单个指定条件的单元格进行计数。例如,可以对以某一字母开头的所有

单元格进行计数,也可以对大于或小于某一指定数字的所有单元格进行计数。例如,假设有一个工作

表在列A中包含一列任务,在列B中包含分配了每项任务的人员的名字。可以使用COUNTIF函

数计算员的名字在列B中的显示次数,这样便可确定分配给该人员的任务数。例如:

=COUNTIF(B2:B25,Nancy)

注释若要根据多个条件对单元格进行计数,请参阅COUNTIFS函数。

语法

COUNTIF(range,criteria)

COUNTIF函数语法具有下列参数:

range必需。要对其进行计数的一个或多个单元格,其中包括数字或名称、数组或包含数字的

。空值和文本值将被忽略。

criteria必需。用于定义将对哪些单元格进行计数的数字、表达式、单元格或文本字符串。

例如,条件可以表示为32、32、B4、苹果或32。

注释

在条件中可以使用通配符,即问号(?)和星号(*)。问号匹配任意单个字符,星号匹配任意一

系列字符。若要查找实际的问号或星号,请在该字符前键入波形符(~)。

条件不区分大小写;例如,字符串app和字符串APP将匹配相同的单元格。

COUNTIF()Function

COUNTIF()FunctionFormulaSyntaxandUsage.

说明

COUNTIFfunctioncountsthenumberofcellswithinarangethatmeetasinglespecified

condition.Forexample,youcancountallcellsthatstartwithacertainletter,orallcellsthat

aregreaterthanorsthanaspecificnumber.Forinstance,assumeaworksheethasalist

oftasksincolumnAandthenamesofpeopleassignedtoeachtaskincolumnB.Youcan

usetheCOUNTIFfunctiontocounthowmanytimesasnameappearsincolumnB,

thusdeterminingthenumberoftasksassignedtothat.Forexample:

=COUNTIF(B2:B25,Nancy)

Note:Tocountcellsbasedonmultipleconditions,seetheCOUNTIFSfunction.

语法

COUNTIF(range,criteria)

TheCOUNTIFfunctionsyntaxhasthefollowing

parameters:

rangeRequired.Oneormorecellstocount,includingnumbersornames,arrays,or

referencesthatcontainnumbers.Emptyvaluesandtextvalueswillbeignored.

criteriaRequired.Thenumber,expression,cellreference,ortextstringthatdefineswhichcellswillbecounted.

Forexample,thecriteriacanbeexpressedas32,32,B4,apple,or32.

注释

Wildcardscanbeusedinconditions,suchasthequestionmark(?)andtheasterisk(*).The

questionmarkmatchesanysinglecharacter,whiletheasteriskmatchesanyseriesof

characters.Tofindanactualquestionmarkorasterisk,typeati

文档评论(0)

1亿VIP精品文档

相关文档