Conditional counting function in Excel

Conditional counting function in Excel. Are you looking for conditional counting function in Excel to use counting data during data processing in Excel spreadsheets? The COUNTIF function is a conditional counting function in Excel, below is the description, syntax and usage

Are you looking for conditional counting function in Excel to use counting data during data processing in Excel spreadsheets? The COUNTIF function is a conditional counting function in Excel, below is the description, syntax and usage of conditional counting function in Excel invite you to follow.

Conditional counting function in Excel Picture 1Conditional counting function in Excel Picture 1

Description

The COUNTIF function is a conditional counting function in Excel, you can count data based on a specified condition.

Syntax

= COUNTIF (range; criteria)

Where range is required, the area where you want to count data. It may contain numbers, arrays, or references that contain numbers . Blank values ​​are ignored.

Criteria (required), this is a condition for counting values ​​in range, it can be numbers, expressions, cell references or text strings.

  1. If you want to count with multiple conditions then you use the COUNTIFS function. (insert the link http://TipsMake.vn/ham-countifs-in-excel/ into the name of COUNTIFS for me)

Note

  1. The COUNTIF function returns false results when you use conditions with strings longer than 255 characters.
  2. The criteria argument is enclosed in quotation marks.
  3. Criteria is not case-sensitive.
  4. It is possible to use a question mark (?) And asterisk (*) in criteria (1 question mark corresponds to 1 character, 1 star corresponds to a string of characters). If you want to use a question mark or asterisk not as a wildcard then you need to add the ~ character before it.

For example

Give the following table of data:

Conditional counting function in Excel Picture 2Conditional counting function in Excel Picture 2

1. Count the number of orders with the product name Orange.

To make this request, you enter the CountIf function formula as follows:

= COUNTIF (B6: B14; "Orange")

As a result, you will see that there are 3 orders with items that are Orange.

Conditional counting function in Excel Picture 3Conditional counting function in Excel Picture 3

2. Count the number of orders with an item name other than Cam.

You use the function formula provided that it is not 'Cam' <> Cam '

= COUNTIF (B6: B14; "<> Orange")

You will get a result of 6 as follows:

Conditional counting function in Excel Picture 4Conditional counting function in Excel Picture 4

3. Count the quantity of orders with quantity sold> = 10 kg.

You use the condition '> = 10' in the sales SL column and the counting range is the sales SL column , the formula is as follows:

= COUNTIF (D6: D14; "> = 10")

Your result will be 6 orders:

Conditional counting function in Excel Picture 5Conditional counting function in Excel Picture 5

4. Count the order number with the product's name Orange using an alternate character *

Instead of typing Cam in CountIf condition, you can enter C * to count.

= COUNTIF (B6: B14; "C *")

The results you also get 3 orders:

Conditional counting function in Excel Picture 6Conditional counting function in Excel Picture 6

5. Count the number of orders with the names of items other than cell B7 (Orange).

You can use the '&' character before the reference cell in the CountIf function condition as follows:

= COUNTIF (B6: B14; "<>" & B7)

The results you will get are:

Conditional counting function in Excel Picture 7Conditional counting function in Excel Picture 7

So, if you need to conditionally count in Excel, you can use the COUNTIF function. Above the article introduced you to describe, syntax, usage and examples of COUNTIF function in Excel. Hope this article will be helpful to you.

Good luck!

4 ★ | 1 Vote