The Count and the Countif is not a romance or mystery novel. These are some incredibly useful functions you can use in your spreadsheets.
Count
The =Count() function tallies up the number of cells that are are numerical in a given range. As you can see in the above example, cell C7 contains the formula “=count(C1:C4)” and returns a value of 0. In the range C1:C4, there are no numerical values, so this is correct. In cell B7, I copied and pasted, so the C1:C4 was changed to B1:B4, and that formula returns a value of 4 because all 4 of those cells are numerical values.
Your range doesn’t have to be linear or even just one range in a count function. If you wanted, you could do “=Count(B1:C4)” or even “=Count(B1:B4,C1:C4)”. Both those functions would return 4.
Countif
The =Countif() function is similar to the count function except that it doesn’t care if the cells are numerical or not. What it is looking for is your designated value. As you can see in the above example, I put =countif($C$1:$C$5,B8) in the formula box. The range designated is C1:C5, but I made it absolute so when I copy and paste into the next box, those values remain the same. The value the formula is looking for is B8, which reads “Good Work”. In our case, “Good Work” appears twice in that range, so the formula returns 2.
CountUnique
Only Google Sheets has a =CountUnique function. This is exactly what it sounds like. Instead of counting every numerical cell in a range, it returns a value of how many unique numerical values there are in a range. In our above example, this function would return 3.
In order to get the same result in Excel, you have to use a series of functions or filters that we won’t be covering here.
Conclusion
Now that you’ve learned how the Count, Countif, and Countunique functions work, you’ve gained another spreadsheet tool for your arsenal.
Leave a Reply