1.7 COUNTIF Function
The COUNTIF function counts the total number of instances that a condition is true. In the example below, the company sold tacos, pizza and burritos. The sales price of each item is listed in the column to the right (column C) of the name of the item. In order to simplify the process of counting how many of each item was sold (e.g., how many tacos, how many pizza slices, and how many burritos), you can use the COUNTIF function. In cell F4 we provide an example of how to use this function for computing the number of tacos sold.
Notice that the COUNTIF function has two parameters that you will need to enter. The first is the range that you will be evaluating to determine if the condition is true. In this case, we select the values in Column B, the name of the item sold. The second parameter you will define is which value from the search range you are looking for. In this cell we want to look for any time the item sold is Taco. For text values, you will need to use parentheses when you identify this item. The result of this formula will be the count of the number of tacos from column C.