Row() Function

Row() Function



The Excel ROW function returns the row number for a reference. For example, ROW(C5) returns 5, since C5 is the firth row in the spreadsheet. When no reference is provided, ROW returns the row number of the cell which contains the formula.


Syntax

The syntax for the ROW function in Microsoft Excel is:

=ROW( [reference] )

Parameters or Arguments

reference

Optional. It is a reference to a cell or range of cells.

Row Function Examples

The spreadsheet below shows six examples of the Excel Row function.

Formulas:


A
B
1
=ROW( )
=ROW( )
2
=ROW( )
=ROW( )
3
=ROW( E7 )
=ROW( G8:H9 )

Results:


A
B
1
1
1
2
2
2
3
7
8

Note that in the above examples:

   The examples in cells A1-B2 omit the [reference] argument. Therefore, in these cases, the Excel Row function returns the row number of the cell that the function is entered into.
   The example in cell A3 provides the reference for cell E7 to the Row function. Therefore, in this case, the function returns row number 7.
   The example in cell B3 provides the range G8:H9 to the Row function. Therefore, in this case, the function returns the row number of the first cell in the supplied range (i.e. cell G8), which is row number 8.

Comments

Popular posts from this blog

Formatting a Range of Cells In Excel VBA

Trunc() Function

BREAK THE PASSWORD OF THE SHEET IN EXCEL