Discussion Locked

Numbering Rows in Excel

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How to I add Row numbers to an existing spreadsheet in Excel?

9 replies

by carquiza

Here is a sample macro:
Sub Sample_Macro1()
Range("A1").Select
ActiveCell.FormulaR1C1 = "1"
Range("A2").Select
ActiveCell.FormulaR1C1 = "=R[-1]C+1"
Selection.AutoFill Destination:=Range("A2:A27"), Type:=xlFillDefault
Range("A2:A27").Select
End Sub

Sub Sample_Macro2()
Range("A40").Select
Selection.EntireRow.Insert
End Sub

by abarnes70

Use the ROW function. In cell A1 (for example) enter

=row()

This can be copied to any row and will display the current row number.

by drmorton1

I am not sure what you are asking, but if it has to do with ROW, use the ROW reference command set. It is simple.

This discussion is closed to new replies.