Excellency

View Original

The ROW function

The ROW function is a lookup and reference function which returns the number of the row based on its position in the spreadsheet.

This is the format of the ROW function:

=ROW(cell reference)

Here is an example of the ROW function:

=ROW(D3) = 3

ROW returning the row number of the cell the function was used in

This function is valuable when you are compiling or reformatting data where you have to perform a variety of tasks on the information dependent on its original position within the spreadsheet.

An example of a functional implementation of this would be if you are restructuring the data which was used in an old report in order to use it for a bigger analysis, but it is poorly formatted. Even numbered rows have raw data inputs in them, and odd numbered rows have totals and subtotals in them. Using the ROW function you can easily switch between two formulas needed to manipulate the data by referencing those cells across your range.

=IF(ISEVEN(ROW()), FORMULA 1, FORMULA 2)

* Note this example uses a combination of IF, ISEVEN, and ROW to generate an impactful and efficient formula. For more information on these functions please visit their dedicated function pages. *