View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Leo Heuser Leo Heuser is offline
external usenet poster
 
Posts: 266
Default divide records equally among multiple employees

"Martin Leffler" skrev i en
meddelelse ...
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?


Hello Martin

If I have understood you correctly, here is one way.
Assuming records in A1:A1000 and names of employees in D1:H1

1. In D2 enter this formula as one line:
=INDEX($A$1:$A$1000,(ROW()-ROW($D$2))*5+MOD(5-(MOD(ROW()-ROW($D$2),5)-(COLUMN()-COLUMN($D$2))),5)+1)
2. Copy D2 to E2:H2 with the fill handle (the littel square in the
lower right corner of the cell)
3. Copy D2:H2 to D201:H201 with the fill handle


Just curious :-)
Why not give them every fifth record?


--
Best regards
Leo Heuser

Followup to newsgroup only please.