Google Sheets COUNTIF function

  1. COUNTIF returns a conditional number in a specific range
  2. COUNTIF syntax and arguments
  3. COUNTIF function examples
  4. Entering the COUNT function

COUNTIF returns a conditional number in a specific range

Function COUNTIF combines the IF function and the COUNT function in Google Sheets. This combination allows you to count how many times specific data has been found in the selected range of cells that match a specified criterion. This is how the function works:

  • Part IF function determines which data matches the specified criteria.

  • Part COUNT function determines the number of cells that meet the criterion.

COUNTIF syntax and arguments

Function syntax refers to the layout of the function and includes the function name, parentheses, comma separators, and arguments. The syntax for the COUNTIF function is:

 = COUNTIF (диапазон, критерий) 

reach is the group of cells that the function should look for. If the range argument contains numbers:

  • Comparison operator, for example > (more than), (less than or equal to) or (not equal to) can be used in an expression and each cell in the range is checked against the criteria.

  • For the criteria for finding equal values equal sign (=) does not have to be included in the expression and the value does not have to be enclosed in quotes. For example, 100 can be used as a criteria argument instead of “=100”, although either will work.

  • For dissimilar expressions that do not contain cell references, the entire expression must be enclosed in double quotes For instance ”

  • For expressions that use comparison operators and cell references, cell references are not enclosed in double quotes, such as “” & B12 or “

  • For expressions that use comparison operators and cell references, the comparison operator is appended to the cell reference with an ampersand (&), which is the concatenation symbol in Excel and Google Sheets, such as “” & B12 or ”

If the range argument contains text data:

  • Text strings must be enclosed in double quotes, such as “drape”.

  • Text strings can contain wildcards ? and * corresponding to one (?) or several

  • adjacent characters. To match the actual? or *, these characters are preceded by tilde

, like ~? and ~*. criterion

  • determines whether the cell specified in the range argument is taken into account. The criterion can be:

  • Number.

  • Cell reference for the location of the data on the worksheet, such as B12.

  • An expression like 100, ”

Text data or text strings such as “Drapes”.

COUNTIF function examples

  • As shown in the figure, the COUNTIF function is used to determine the number of data cells in column A that meet various criteria. The results of the COUNTIF formula appear in column B, and the formula itself appears in column C.

  • The first five lines of the example contain text data for the function criterion argument and use cells A2 through A6 for the range argument.

The last five lines contain numeric data for the criteria argument.

Entering the COUNT function

Google Sheets doesn’t use dialog boxes to enter function arguments like Excel does. Instead, it has an automatic suggestion box that appears when the function name is entered in a cell.

The following are detailed instructions for entering the COUNTIF function and its arguments in cell B11 of the sample image. In this cell, COUNTIF searches for numbers in the range A7 to A11 that are less than or equal to 100,000.

  1. To enter the COUNTIF function and its arguments, as shown in cell B11 of the figure: Select cell B11 to make it active. Displays the results of the function. COUNTIF

  2. . Enter equal sign ( = ) and then the function name

  3. count. As you type, an auto-suggestion box appears with function names and syntax starting with a letter C

  4. . When the name appears in the field COUNTIF Click Enter on the keyboard to enter the name of the function and open the brackets in the cell B11

  5. . highlight cells A7 A10

  6. to include them as the range argument of the function. Enter comma

  7. to act as a separator between the range and criteria arguments. Enter the expression after the decimal point

the completed formula is displayed in the formula bar above the worksheet:

Leave a Reply

Your email address will not be published. Required fields are marked *