ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Autonumbering in Excel (https://www.excelbanter.com/excel-discussion-misc-queries/101599-autonumbering-excel.html)

ryadav

Autonumbering in Excel
 
1 Attachment(s)
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

Gord Dibben

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|
+-------------------------------------------------------------------+




All times are GMT +1. The time now is 03:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com