up vote 1 down vote favorite
share [g+] share [fb]

How can I find out the row number in an Excel spreadsheet?

link|improve this question
By formula, try Row() – Richard Morgan Oct 12 '09 at 12:05
Could you offer us a bit more information into what you want to achieve? – alex Oct 12 '09 at 12:13
feedback

migrated from stackoverflow.com Oct 12 '09 at 12:02

This question came from our site for professional and enthusiast programmers.

1 Answer

ROW(C5) gives the row number of cell C5, ie 5. This can be useful for making sure that you have a fixed starting point for some other function like an OFFSET. If someone adds or deletes rows which affect that C5 cell, your formula would update to C4, C6 or whatever, and you still have a correct starting row.

ROW() gives the row number of the cell you use that formula in. I often use this with the MOD function in conditional formats to stripe sets of rows, or underline every 5th one say to make it easier to follow rows across a printed page.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown