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 rng, and COLUMNS returns the total number of columns in rng. The formula multiplies these values together and returns the result.
Note that this formula only works for a single rectangular range of cells.
If you need to count the number of rows in a range, use the ROWS function. In the generic form of the formula (above) rng represents a range of cells. In the example, the active cell contains this formula: = ROWS ( B4:C9 ) ROWS counts the number of...
If you need to count the number of columns in a range, use the COLUMNS function. In the generic form of the formula (above) rng represents a range of cells. In the example, the active cell contains this formula: = COLUMNS ( B4:C9 ) Here's how the...
The Excel COLUMNS function returns the count of columns in a given reference. For example, COLUMNS(A1:C3) returns 3, since the range A1:C3 contains 3 columns.
Excel Formula Training
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.