View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JLatham JLatham is offline
external usenet poster
 
Posts: 2,203
Default divide records equally among multiple employees

Here is a nested IF statement that could work for you also. This presumes
your records start on row 1, you can put this in ANY cell on row 1 and then
extend it down through all of the rows your records are on.
=IF(ROW(A1)<1000/5*1+1,"Employee #1",IF(ROW(A1)<1000/5*2+1,"Employee
#2",IF(ROW(A1)<1000/5*3+1,"Employee #3",IF(ROW(A1)<1000/5*4+1,"Employee
#2","Employee #5"))))

If your records start somewhere farther down the sheet, Row 10 for this
example, you can adjust it a couple of ways, one would be like this:
=IF(ROW(A10)-9<1000/5*1+1,"Employee #1",IF(ROW(A10)-9<1000/5*2+1,"Employee
#2",IF(ROW(A10)-9<1000/5*3+1,"Employee #3",IF(ROW(A10)-9<1000/5*4+1,"Employee
#2","Employee #5"))))

the 1000 is the number of records, the 5 is for number of employees. Just
one alternative.

"Martin Leffler" wrote:

example: I have 1000 sorted records. I have 5 employees. I want 1st record to
go to emp 1; 2nd record to emp 2 ... 5th record to 5th emp. Then I want to
start new assignment of records: emp 2 gets 1st rec; emp 3 gets 2nd rec....
emp 1 gets 5th record, thus rotating which emp gets first record. Is this as
difficult as it appears?