![]() Using COUNTIF with multiple criteria. Syntax for a single criteria is: =COUNTIF(range, criteria) The best function you can use for situations when you need to count cells based on multiple criteria is the COUNTIFS function. The “s” on the end of Countif makes it plural, and that means that there are multiple criteria. ![]() This video is part of a training course called. Syntax COUNTIFS(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. Additional ranges and their associated criteria. Up to 127 range/criteria pairs are allowed. Important: Each additional range must have the same number of rows and columns as the criteria_range1 argument. The ranges do not have to be adjacent to each other. Remarks • 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. Example 1 Copy the example data in the following tables, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data. Salesperson Exceeded Q1 quota Exceeded Q2 quota Exceeded Q3 quota Davidoski Yes No No Burke Yes Yes 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 Example 2 Data 1 5/1/2011 2 5/2/2011 3 5/3/2011 4 5/4/2011 5 5/5/2011 6 5/6/2011 Formula Description Result =COUNTIFS(A2:A7,'1') Counts how many numbers between 1 and 6 (not including 1 and 6) are contained in cells A2 through A7. 4 =COUNTIFS(A2:A7, '. If there are multiple criteria in multiple columns, such as following screenshot shown, and I want to get the number of KTE whose order is greater than 200 and the name is Ruby. Please type this formula into a desired cell: =COUNTIFS($A$2:$A$15,'KTE',$B$2:$B$15,'>300',$C$2:$C$15,'Ruby'), and then press Enter key to get the number of KTE which you need.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |