Excel has a variety of ways to count cells in a list, range or data set. Some are more suitable than others depending on the data types you want to count. To learn the various methods of counting in Excel read on… Show
Counting in ExcelThere are four key functions for counting in Excel and worthwhile making any Excel users knowledge base. The four functions to know are:
Let us look at each of these Excel counting functions in more detail to understand when best to use. The COUNT function in Excel can be used to count the number of cells within a specified data range that contain values. By Values that means numerical values and not text or strings. The COUNT function will ignore any text values in the specified range and it will also ignore any blank or empty cells in the range. For example if you wanted to count the number of values in cells B2 to B11 then you would use: = COUNT(B2:B11) And that would produce an answer of 10 because there are 10 values in the specified range: However if you change a couple of the values in the range, making cell C4 blank and cell C8 equal to ABC then notice the COUNT function does not produce an error, rather it Ignores those two values and produces a result of 8 values in the specified range: COUNTAThe COUNTA function in Excel can be used to count the number of cells within a specified data range that contain values or text, basically this function will count any cell in the range that is not empty. If we refer back to our example and change the formula in cell B12 to =COUNTA(B2:B11) Then it will produce a result of 9 as there are 9 non-empty cells in the specified data range: So that covers counting values and counting non-empty cells but what about if you want to count only specified cells, read on! COUNTIFThe COUNTIF function in Excel can be used to count the number of cells within a specified data range that meet a certain criteria. This is a highly useful function as you can use it to just count specific values, i.e those over 5 and you can even adopt a little trick to count all cells in a range, regardless of whether they are blank, text or values. Falling back to the current example if you want to count all cells in the range that are over 5 the formula in cell B12 would be: =COUNTIF(B2:B11,”>5″) To break that down in more detail the COUNTIF function requires two inputs:
In action this will return a result of 4 in our example, this is because out of the specified data range of B2:B11 only the values 6,8,9 and 10 meet the criteria of being greater than 5: You can use the COUNTIF function to also just count specified text strings which can come in very handy when performing Excel data analysis. If in our example we wanted to count how many cells contain the string “ABC” then the formula to use in cell B12 would be: =COUNTIF(B2:B11, “ABC”) There is only one cell with the value ABC in the range, as shown by performing this formula on the Excel worksheet: Another final trick with the COUNTIF function in Excel is that you can use it to count all cells in a range, regardless of whether they are values, text, empty or not. To do this use the formula below in cell B12: =COUNTIF(B2:B11,”<>”””) This formula counts all 10 cells in the range: COUNTBLANKThe final Excel counting function to introduce you to is COUNTBLANK and as you have probably guessed this can be used to count the number of blank or empty cells in a specified range. You might question why this function is useful but believe me it is invaluable for performing data analysis and quality checks on data sets. Sometimes in Excel data analysis it is very important to understand what data is missing and if a record is supposed to have a value but is empty then the COUNTBLANK function can be used to identify those problems. To use the COUNTBLANK function the formula is very simple. In cell B12 we simply enter: =COUNTBLANK(B2:B11) Again with the example this will produce a result of 1 as there is only 1 blank/empty cell in the specified data range: Summary
I hope that proves useful to you in your quest to become a better Excel user. Excel training that even Count von Count himself would be proud of! 🙂 Keep Excelling, Which function would you use if you wanted to count the number of values but ignore?Count nonblank cells in a range by using the COUNTA function
Use the COUNTA function function to count only cells in a range that contain values. When you count cells, sometimes you want to ignore any blank cells because only cells with values are meaningful to you.
Which function would you use if you wanted to count the number of values but ignore cells that have text or are empty group of answer choices?COUNTA doesn't count empty or blank cells. You need the COUNTBLANK function for that.
Which function would you use if you wanted to count the number of values?Use the COUNT function to get the number of entries in a number field that is in a range or array of numbers. For example, you can enter the following formula to count the numbers in the range A1:A20: =COUNT(A1:A20).
What does average function not ignore?The AVERAGE function ignores empty cells, text values, and boolean values automatically, however, it doesn't handle error values. The AVERAGE function returns an error if the data contains at least one error value.
|