Site icon ExcelNotes

How to Count Cells in a Range

When you work with a worksheet, you may wonder how many cells are in a range, both with data and blank ones. There are different methods you can figure out this question and we will discuss two of them in this article.

Example: You are working with a dataset with the first name in column A, the last name in column B, and the salary in column C. Assume you are curious about how many cells are in the highlighted range.

Formula 1: To count the number of cells that are blank and those that are not blank

=SUM(COUNTBLANK(A1:D9), COUNTA(A1:D9))

The result returns 36, and the range has 36 cells.

Formula 2: To count the number of cells by rows and columns

= ROWS(A1:D9)*COLUMNS(A1:D9)

The result returns 36, and the range has 36 cells.

Notes: The ROWS function

Formula:

= ROWS(array)

Explanations:

The array is required. The number of rows in the data ranges you are looking for.

Exit mobile version