Home ➜ Excel Formulas ➜ Count Total Number of Cells from a Range In Excel, you can use two different formulas if you want to count the number of cells
from a range (blank and non-blank cells). In this tutorial, we are going to look at both formulas. In the following, example we have a few values in column A, and you need to count the cells from the range A1:B10. And for this, we will use the ROWS and COLUMNS function. Steps to write the formula: Now as you can see, when you hit enter, it returns 20 in the result as you have a total of 20 cells in the range you have specified. Now let’s try to understand the formula that we have used here. In the first part, we have used the ROWS function which returns the number of rows that you have in a range. Here it returns 10 as you have ten rows in the range A1 to B10. Now when next you have the COLUMNS function that returns the number of columns you have in a range. Here it returns 2 as you have two columns in the range A1 to B10. In the end, you have an asterisk sign between both the values to multiply rows and columns to get the total number of cells in the range. Combine COUNTA – COUNTBLANK to Count Cells from a RangeThe second method wants you to combine COUNTA and COUNTBLANK functions. By combining both functions you can count all the non-blank cells and all the blank cells from a range. Below we have the same example that we have used in the first example. In the cell D1, you can enter the following formula: =COUNTA(A1:B10)+COUNTBLANK(A1:B10) As I said, this formula works in two parts:
In the end, you have a “+ sign” which sum both number and returns you the total count of cells that you have in the range that you have specified. 🔙 Excel Formulas More FormulasThe COUNTIF not blank function counts non-blank cells within a range. The universal formula is “COUNTIF(range,”<>”&””)” or “COUNTIF(range,”<>”)”. This formula works with numbers, text, and date values. It also works with the logical operators like “<,” “>,” “=,” and so on. Note: Alternatively, the COUNTA functionThe COUNTA function is an inbuilt statistical excel function that counts the number of non-blank cells (not empty) in a cell range or the cell reference. For example, cells
A1 and A3 contain values but, cell A2 is empty. The formula “=COUNTA(A1,A2,A3)” returns 2. read more can be used to count the non-blank cells. The steps to count non-empty cells with the help of the
COUNTIF function are listed as follows: “=COUNTIF(range,”<>”&””)” In the range argument, type B2:B30. Alternatively, select the range B2:B30 in the formula, as shown in the following image. This implies that there are 26 cells in the given range that contain a data value. This data can be a number, text, or any other value. The steps to count non-empty cells within text values are listed as follows:
Hence, the COUNTIF not blank formula works with text values. #3–Date ValuesThe steps to count non-empty cells, when the data consists of dates, are listed as follows:
“=COUNTIF(B2:B21,”<>”&””)”
Hence, the COUNTIF not blank formula works with data that consists of date values. The Characteristics of COUNTIF Not Blank Function
Frequently Asked QuestionsHow is the COUNTIF formula used to count blanks? The universal formula for counting blanks is stated as follows: “COUNTIF(range,””)” This formula works with all types of data values. Note: Alternatively, the COUNTBLANK function can be used to count blank cells. How does the COUNTIF function count the duplicate values? The formula for counting the duplicate value is given as follows: “COUNTIF(range,“duplicate value”)” The “range” represents the range within which the duplicate values are to be counted. The “duplicate value” is the exact data value that is to be counted. For example, to count the number of times the text “fruits” appears in the range A2:A10, we use “=COUNTIF(A2:A10,“fruits”).”
Recommended ArticlesThis has been a guide to Excel COUNTIF not blank. Here we discuss how to use the COUNTIF function to count non-blank cells along with practical examples and a downloadable Excel template. You may learn more about Excel from the following articles –
What function counts the number of cells that are not blank within a specified range of cells?The COUNTA function counts the number of cells that are not empty in a range.
How do you count if the cell is not blank?Count If Cell Is Not Blank (Also Count If Cell Is Blank). Counting Non-Blank Cells In Excel. Using COUNTIF Function. Using COUNTA Function. Using SUMPRODUCT Function.. Counting Blank Cells. Using COUNTBLANK Function. Using COUNTIF Function.. Which of the following functions counts the number of cells in a range that contain any data type?The COUNT function counts the number of cells that contain numbers, and counts numbers within the list of arguments. Use the COUNT function to get the number of entries in a number field that is in a range or array of numbers.
|