Autonumbering in Excel

R

ryadav

Is there anyway of inserting an auto number in a cell like you can i
Access.

I have tried using the code below, but its doing something different t
what I want.

'/===============================/
Private Sub Worksheet_Activate()
Range("A1").Value = Range("A1").Value + 1
End Sub
'/===============================/

The spreadsheet I am working on requires the user to input helpdes
requests, and each request has a number which needs to be a
autonumber. The same sort of thing when you add a record in access th
autonumber gets inserted. Is there anyway that this can be done i
Excel?

Thank

+-------------------------------------------------------------------
|Filename: Helpdesk_input form.zip
|Download: http://www.excelbanter.com/attachment.php?attachmentid=71
+-------------------------------------------------------------------
 
G

Gord Dibben

Looks OK to me.

Tested and number in A1 increases when sheet is activated.

What is it doing for you?

Could be it is not the right code for your needs?


Gord Dibben MS Excel MVP
 
Top