Thread: AutoNumber
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default AutoNumber

Hi,

Try this

Sub Prime_Lending()
lastval = Range("A1").Value
For x = 1 To lastval
Cells(x + 9, 5).Value = x
Next
End Sub


Mike

"bijan" wrote:

Hi all,
I need a vba code for autonumber cells from E10 to the a variable number
that I insert in A1, for example if A1=20 it fill E10:E29 with 1-20
Thanks in advance
Bijan