COUNTIFS function
DefinitionThe COUNTIFS function applies criteria to cells across multiple ranges and counts the number of times all criteria are met.
SyntaxCOUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…) The COUNTIFS function syntax has the following arguments:
- criteria_range1 Required. The first range in which to evaluate the associated criteria.
- criteria1 Required. The criteria in the form of a number, expression, cell reference, or text that define which cells will be counted. For example, criteria can be expressed as 32, ">32", B4, "apples", or "32".
- criteria_range2, criteria2, ... Optional. Additional ranges and their associated criteria. Up to 127 range/criteria pairs are allowed.
- Each range's criteria is applied one cell at a time. If all of the first cells meet their associated criteria, the count increases by 1. If all of the second cells meet their associated criteria, the count increases by 1 again, and so on until all of the cells are evaluated.
- If the criteria argument is a reference to an empty cell, the COUNTIFS function treats the empty cell as a 0 value.
- You can use the wildcard characters— the question mark (?) and asterisk (*) — in criteria. A question mark matches any single character, and an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
| Salesperson | Exceeded Q1 quota | Exceeded Q2 quota | Exceeded Q3 quota |
|---|---|---|---|
| Burke | Yes | Yes | No |
| Davidoski | Yes | No | No |
| Sundaram | Yes | Yes | Yes |
| Levitan | No | Yes | Yes |
| Formula | Description | Result | |
| =COUNTIFS(B2:D2,"=Yes") | Counts how many times Davidoski exceeded a sales quota for periods Q1, Q2, and Q3 (only in Q1). | 1 | |
| =COUNTIFS(B2:B5,"=Yes",C2:C5,"=Yes") | Counts how many salespeople exceeded both their Q1 and Q2 quotas (Burke and Sundaram). | 2 | |
| =COUNTIFS(B5:D5,"=Yes",B3:D3,"=Yes") | Counts how many times Levitan and Burke exceeded the same quota for periods Q1, Q2, and Q3 (only in Q2). | 1 |
No comments:
Post a Comment