• Aug 22, 2024

Counting the Number of Cells in an Excel Range

Excel has functions to count the number of rows and columns in a range. It doesn’t have a function to count the number of cells in a range. We can still perform the calculation with the COUNTA function.

Sign up to hear about free Excel training.

I won't share your email with anyone.

I recently saw a post on LinkedIn that used the + sign in front of a range reference.

On a blank range this converts all the blanks to zeroes. We can use this to count the number of cells in the range.

In the image above the yellow range is empty and as you can see the COUNTA function in cell A1 doesn’t count anything in the range.

A simple change to the range reference enables us to count the number of cells in the range – see image below.

Adding the + sign converts blank cell into zeroes and COUNTA counts all the zeroes.

Note the technique ignores if merge and center has been used in the range. Its still counts all the cells.

In the image below I have applied the merge and center to row 3 in the yellow range and it doesn’t change the calculation.

0 comments

Sign upor login to leave a comment