Results 1 to 3 of 3

Thread: Shift Pattern

  1. #1
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Morning all

    I have 9 drivers that I would like to put on a shift pattern, which I have done in the attached workbook. So that they work a different shift each week I have defined the shifts over a 7 day pattern. So far so good, however what can I do with the formula below to make the shifts run week 1 through to week 9, for example I would like driver CS to work

    Week 1 Commencing June 1st = Shift 1
    Week 2 Commencing June 8th = Shift 2
    Week 3 Commencing June 15th = Shift 3
    Week 4 Commencing June 22nd = Shift 4
    Week 5 Commencing June 29th = Shift 5
    Etc.

    With the following code CS is working Shift 1, Shift 9, Shift 8, Shift 7, Shift 6, etc. (apart from Week 1 it is runningbackards)

    Code:
    =OFFSET($D$3,MOD(ROW()-11,7),INDEX({0;1;2;3;4;5;6;7;8},MOD(INT((ROW()-11)/7+MOD(COLUMN()-2,9)),9)+1))
    This formula is in D11 in the example and then dragged across to L11 and down to L375
    Attached Files Attached Files
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This should do it. I've highlighted the changes to the original formula.

    =OFFSET($D$3,MOD(ROW()-11,7),INDEX({0;1;2;3;4;5;6;7;8},MOD(INT((-ROW()-11)/7+MOD(COLUMN()+2,9)),9)+1))

  3. #3
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Mike

    Fanastic, thanks for your help.

    I guess the +2 started to look from the second column on the left as opposed to - which started from the right? When I changed it to +1 it took the first person in the shift patern.

    But what of the -row instead of row, what did that do to change the order?
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •