Monday, March 3, 2014

Functions: ROWS & COLUMNS


We saw about ROW & COLUMN functions in the previous post. In this post, we will see about 2 more functions in Excel lookup & reference category viz. ROWS & COLUMNS functions. This would be very small post.

ROWS

This function returns the number of rows in a reference provided as an argument. Function syntax is as below.
ROWS(array)
array: Unlike ROW function, this argument is mandatory here. This argument can refer to a cell, range of cells, array or named range.

Few examples:


As the function returns the number of rows in the given reference, formula in cell A2 results 1 (cell A1 contains only 1 row) and cell A6 formula result is 9 (there are 9 rows in range D3 to D11).

COLUMNS

On the same lines with ROWS function, COLUMNS returns the number of columns in a reference provided as an argument. Function syntax is as below.
COLUMNS(array)
array: mandatory argument. This argument can refer to a cell, range of cells, array or named range.

Few examples:


As the function returns the number of columns in the given reference, formula in cell A2 results 1 (cell A1 refers to only 1 column) and cell A3 formula result is 2 (there are 2 columns in range B3 to C3).