To generate Numbers in Excel

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
 
C

Code Numpty

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.
 
N

Nayab

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
 
M

Mike H

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top