View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas[_2_] Gary Keramidas[_2_] is offline
external usenet poster
 
Posts: 364
Default add column of numbers for each row

you can use this from tom's previous post, assuming the data is in column a

Option Explicit
Dim rng As Range
Sub test()

Set rng = Range(Cells(1, 1), Cells(1, 1).End(xlDown))
rng.Offset(0, 5).Formula = "=Row()"

End Sub

--


Gary


"Gerry" wrote in message
oups.com...
In column F, I would like to add a number for each row
F1 =1
F2 =2
down to the last row, which is unknown.

TIA
Gerry