Formatting cells to auto number??

  • Thread starter Thread starter RDL17
  • Start date Start date
R

RDL17

Hi,

I am entering along rows names and info for a waiting list
database. I need to automatically number each new
person's entry, and the numbers need to start at 1001,
1002, 1003.....and so on. The people will be entered as
they apply, so the first on the list was the first to
apply.

The problem is that I've come across old applications and
need to enter them in between to entries, and I need the
numbers to automatically adjust themselves. I've tried
inserting a new row and copying a forula like, =(A1=1),
and ones like that, but they just give me a copy of the #
above..CAN ANYONE HELP PLEASE!!!
 
Hi
the following formulas will put a sequencing number in column A, if
column B is filled:

in A1 enter the following formula
=IF(B1<>"",1,"")

in A2 enter the formula
=IF(B2<>"",MAX($A$1:OFFSET($A2,-1,0))+1,"")
and copy this formula down for as many rows as you like
 
This will work automatically if you have 1000 in a2 and 1001 in a3 and don't
change those
right click sheet tab>view code>copy/paste this>modify to suit>save
Assumes you are entering in column B and want numbers in column A

Private Sub Worksheet_Change(ByVal Target As Range)
x = Cells(Rows.Count, "b").End(xlUp).Row
If Target.Row < 2 Or Target.Column <> 2 Then Exit Sub
Range("a2:a3").AutoFill Destination:=Range("a2:a" & x)
End Sub
 
I may be missing the point but try starting the first row with th
number 1 by entering 1 into cell A1, then put =A1+1 into cell A2. No
copy cell A2 down the whole list
 
Back
Top