ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Create an Auto Number (https://www.excelbanter.com/excel-worksheet-functions/7293-create-auto-number.html)

Metric

Create an Auto Number
 
My company has a service log (Excel Spreadsheet) they started 3 years
ago...each entry was given a manual number (column A)...over time people have
just generated that number manually...sometimes they can't count and the next
number is 1 off. I'm trying to determine if there is an easier way to auto
generate the next number in the list. For example we are at 7000; I want the
next row down to generate 7001. How can I do this???

Ron de Bruin

Hi Metric

If you start in row 1 you can use thsi formula and copy it down

=ROW()

If you start in row 6 then you can use this

=ROW()-5


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Metric" wrote in message ...
My company has a service log (Excel Spreadsheet) they started 3 years
ago...each entry was given a manual number (column A)...over time people have
just generated that number manually...sometimes they can't count and the next
number is 1 off. I'm trying to determine if there is an easier way to auto
generate the next number in the list. For example we are at 7000; I want the
next row down to generate 7001. How can I do this???




Jason Morin

What triggers the invoice # to be created? If the user
enters a value in column B, this will trigger the next
sequential invoice # in col. A:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count 1 Then Exit Sub
If Not Intersect(Target, Range("B:B")) Is Nothing Then
With Target
.Offset(0, -1).Value = .Offset(-1, -1).Value + 1
End With
End If
End Sub

---
To load this, right-click the worksheet tab, View Code,
and paste this in.

HTH
Jason
Atlanta, GA

-----Original Message-----
My company has a service log (Excel Spreadsheet) they

started 3 years
ago...each entry was given a manual number (column

A)...over time people have
just generated that number manually...sometimes they

can't count and the next
number is 1 off. I'm trying to determine if there is an

easier way to auto
generate the next number in the list. For example we

are at 7000; I want the
next row down to generate 7001. How can I do this???
.



All times are GMT +1. The time now is 08:39 PM.

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