Create an Auto Number

M

Metric

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???
 
R

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
 
J

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
 

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