The data represents drinks purchased by five people on different days.
Note that most people appear more than once in the data.
Also, note that we are using names as a unique identifier for convenience only.
Normally, data like this will include some sort of unique ID for each person.
Essentially, we want to count rows where a given name appears with “coffee”.
COUNTIFS won’t return TRUE and FALSE, but rather a number that represents a count.
When supplied conditions are met, the result will be a non-zero number.
This is a global test applied with all data considered.
Tea
To verify if a person has ever purchased tea, we use the same approach.
More than one condition can be tested by nesting IF functions.