To generate Numbers in Excel

  • Thread starter Thread starter Sonal
  • Start date Start date
S

Sonal

Hello,

i have to generate autonumber in excelsheet from no 1 to 5000. Can anybody
sggest me how go abt it as fast as possible ...without typing those many no.
Its urgent. plesse help.
i am using office 2003.

Thnx & Regards,
Sonal
 
Type the number 1 in any cell and number 2 in the cell next to or below it.
Highlight both cells, place your mouse pointer over the bottom right corner
of the cell (Fill handle) until the mouser pointer changes to a small black
cross. Left click and drag down or across until 5000 is reached.
 
Type the number 1 in any cell and number 2 in the cell next to or below it..
Highlight both cells, place your mouse pointer over the bottom right corner
of the cell (Fill handle) until the mouser pointer changes to a small black
cross. Left click and drag down or across until 5000 is reached.







- Show quoted text -

Run the following macro:

Sub gen_num()
Dim Row_count As Integer
Row_count = 1
Do While Row_count < 5001
Range("A" & Row_count).Value = Range("A" & Row_count).Row
Row_count = Row_count + 1
Loop
End Sub
 
Hi,

Enter 1 in A1, select the cell and tap F5
In the input box type A1:A5000
Click OK
Then
Edit|fill|series
Click OK

Mike
 
Back
Top