View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Autonumbering in Excel

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

On Thu, 27 Jul 2006 10:35:28 +0100, ryadav
wrote:


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

I have tried using the code below, but its doing something different to
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 helpdesk
requests, and each request has a number which needs to be an
autonumber. The same sort of thing when you add a record in access the
autonumber gets inserted. Is there anyway that this can be done in
Excel?

Thanks


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