Problem of numbers..

A

adn4n

Hi there,

i have a problem where i need an employee number to appea
automatically next to the first name of the employee's name cell. Let
say the first employee number is '1' for the 1st employee (which i
entered manually). How would i get the 2nd employee number '2' t
appear automatically underneath employee#1 when a new employee is adde
to the sheet Via, using the data form.

I know the formula is something like:

Add 1 to the previous number.. This is so that the next employee numbe
increases in steps of 1, and keeps increasing everytime a new employe
is added.

But it dont seem to work when i try this, can anyone help me please
thankyou
 
F

Frank Kabel

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
 
O

otium

Assuming column A is the employee name and B is the employee number th
formula for column B would be...

=IF(A2<>0,B2=B1+1
 
E

Earl Kiosterud

ad,

With a formula solution, the employee numbers will get reassigned if an
employee is removed. You won't be able to sort your table either, which is
something you're very likely to want to do at times (you might want them in
Date-of-Hire order, Birthday order, Salary order, or whatever your immediate
needs are). Well, OK, you can sort it, but the employee numbers are likely
to get reassigned with a formula solution. That should make things
interesting, especially at payroll time, or bonus time! :)

A macro that assigns a permanent number when an employee is added is
probably what you need. We can provide one if you're interested in going
that route. We'll need to know more about your employee table.
 
Top