The classic solution is to use a formula based on the ROWS function and the COLUMNS function.
It is also possible to force the COUNTA function to count all cells, empty or not.
Both approaches are explained below.
Since there are 12 rows in the range B4:H16, ROWS returns 12.
This is the total number of cells in an Excel worksheet.
TheCOUNTA functionwill count cells that contain numbers, text, or errors.
It will not count empty cells.
Caution: this formula will work fine on fine on typical size ranges.
COLUMNS Function
The Excel COLUMNS function returns the count of columns in a given reference.
COUNTA does not count empty cells.