Excel - How to number rows
I can't figure out how to use the auto number routine in Excel 2010 so I made this one up.
Sub NumberCol()
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A1").Select
Selection = 1
C = ActiveCell.Address
D = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
E = "A1:A" + Trim(Str(D))
Selection.AutoFill Destination:=Range(E), Type:=xlFillSeries
End Sub