The COUNTIFS formula in excel counts the number of cells in a range that match two or more criteria. The syntax for this formula is as follows: =COUNTIFS (range1, criteria1, [range2], [criteria2],...) Here is an example; in the table below, I want to count the number of movies in which “Robert Rodriguez” is credited as both the “Director” and the “Composer”. Here is how we get to know that this number is equal to 9: Furthermore, if we would like to have an inclusive list of the these nine movies, this could be done by incorporating the COUNTIFS formula within a simple IF statement Here is the syntax for a simple IF statement: =IF (logical_test, [value_if_true], [value_if_false]) And here is how the COUNTIFS could be incorporated within an IF statement as the Logical Test: Logical_test : the COUNTIFS statement Value_if_true : name of film in column C Value if False : blank here is the actual formula that I will place in the spreadsheet as demonstrated below: =IF(COUNTIFS(D6,"X",G6,"X"), C6, "") In the screen shot above, the IF statements returns the name of the movie from column “C” whenever the COUNTIFS criteria is fulfilled. If the COUNTIFS criteria are not met then a blank value (i.e.””) will be returned. In order to apply the formula to the entire range, simply drag it down. Here is the desired outcome:
0 Comments
Your comment will be posted after it is approved.
Leave a Reply. |
CategoriesArchives
June 2020
|