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.
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.
- 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
- The COUNTIF function returns false results when you use conditions with strings longer than 255 characters.
- The criteria argument is enclosed in quotation marks.
- Criteria is not case-sensitive.
- 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:
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.
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:
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:
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:
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:
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!