The ROW Function determines the row number of a single cell or the row numbers of the range you specify.

The ROW function is a computer program that you run from a worksheet cell formula. It determines the row number of a single cell or the row numbers of the range you specify. You run the ROW worksheet function by typing its name in a formula then followed by the information it is suppose to analyze. The sole use of this function is to return the row numbers of a specified range or cell. It is commonly used as a nested function in other functions that require the row and column coordinates of a cell like the ADDRESS function. It is also quite heavily used as a nested function in the IF function where logic is used to determine what row numbers to return from its answer if a range was used as its argument.

Whenever you type a formula in a worksheet cell, this is called syntax or grammar. The general ROW function syntax has a format like this when you type it in a worksheet cell:

=ROW([reference])

Where [reference] is called the function argument list. Remember, you are running a computer program at this point so the program needs information to operate and that is why there is an argument list. When you see an argument list and you see square brackets [ ] around the argument name, this means the argument is optional and you do not have to include it when typing unless you need it. So for the syntax above, you do not need to include any arguments for the ROW function when typing it in a worksheet cell formula in order for it to calculate correctly. What argument value can be used is discussed below. Remember functions expect certain things in their argument lists, if you do not put the correct information in the list they will generate an error when run.

Since the ROW function is a computer program, it runs when you press Enter to enter the formula that contains it. If any of the arguments are wrong, the function will return an error.

When typing the ROW function in a worksheet cell formula, you can include an argument if you want. Some typical arguments you can use are:

Argument Type | Cell Formula | Example Explanation |

Nothing | = Row( ) | Returns the ROW number of the cell it is typed in |

Cell Reference | = Row( A1 ) | Returns the ROW number of 1 |

Range Reference | = Row( A1:A10 ) | Returns the ROW numbers 1,2,3,4,5,6,7,8,9,10. Not of any use unless interpreted in some other function by nesting. See last example. |

Nested | =ROW( INDIRECT( "A1:" & ADDRESS( 1, COUNTA( A1:A10 ) ) ) ) | Returns the ROW numbers between cell A1 and the ending ROW in column A calculated by the ADDRESS and COUNTA functions. Not of any use unless interpreted in some other function by nesting. See last example. |

Nested | =ADDRESS( MAX( IF( B1:B10>0, ROW( A1:A10 ),FALSE ) ) ,1) | Returns the address of the cell in column A that is greater than 0 in column B. MAX is used to calculate the largest ROW number generated by the IF function in column A. ADDRESS takes that number and uses it to figure out the cell reference of that cell. This type of formula is called an array formula and is entered by pressing Ctrl+Shift+Enter. It is actually used as a nested part of a larger formula. |

Need Help? Please call us at 1.805.498.7162

Excel Training Services

Microsoft Excel Products

EMAGENIT Company Information

US Military Discounts

Copyright © 2002-2019

EMAGENIT All Rights Reserved