In: Statistics and Probability
I am trying to use the countif or countifs function to count the number of genres used to describe a film and no matter what syntax I use, the result is 0. Can I use the countif(s) function to count columns? I want to count the number of movies that have 3 or more genre's associated with them.
Here is a sample of the data I am working with:
primarykey | Movie | Genre1 | Genre2 | Genre3 | Genre4 | Genre5 | Genre6 | Genre7 |
tt0499549 | Avatar | Action | Adventure | Fantasy | Sci-Fi | |||
tt0449088 | Pirates of the Caribbean: At World's End | Action | Adventure | Fantasy | ||||
tt2379713 | Spectre | Action | Adventure | Thriller | ||||
tt1345836 | The Dark Knight Rises | Action | Thriller | |||||
tt5289954 | Star Wars: Episode VII - The Force Awakens | Documentary | ||||||
tt0401729 | John Carter | Action | Adventure | Sci-Fi | ||||
tt0413300 | Spider-Man 3 | Action | Adventure | Romance | ||||
tt0398286 | Tangled | Adventure | Animation | Comedy | Family | Fantasy | Musical | Romance |
tt2395427 | Avengers: Age of Ultron | Action | Adventure | Sci-Fi |
Notice the formula that I have used in cell J2. You have to use
that formula in all the cells of the column J.
For example, in cell J3, the formula will be
=7-COUNTIF(C3:I3,""), in cell J4, the formula will
be =7-COUNTIF(C4:I4,"") and so
on.
After getting the no. of genres associated with the films in the J
column, I guess you will be able to identify those movies which
have 3 or more genres associated with them.