# How to count total number of cells in a rectangular range in Excel

If you need to count the total number of cells in a rectangular range, you can do so with the ROWS and COLUMNS functions.

## Formula

=ROWS(range)*COLUMNS(range)

Note that this formula only works for a single rectangular range of cells.

## Explanation

In the example, the active cell contains this formula:

=ROWS(B4:C9)*COLUMNS(B4:C9)

### How this formula works

There is no built-in function for counting the total numbers of cells in a range, so you need to use the ROWS and COLUMNS functions together. In the example, ROWS returns the total number of rows in range, and COLUMNS returns the total number of columns in range. The formula multiplies these values together and returns the result.