+ Reply to Thread
Results 1 to 5 of 5

Rota Generator

Hybrid View

  1. #1
    Registered User
    Join Date
    05-17-2024
    Location
    Exeter, England
    MS-Off Ver
    Office 2021
    Posts
    3

    Rota Generator

    Hi this may have already been covered somewhere but i cannot find anything.

    I am looking at automatically generating a rota based on some parameters.

    i have a list of staff and i have a week template with all available shifts that can been filled randomly.

    However staff work a different number of shifts each week which is also highlighted.

    How can i auto populate this rota to make sure staff are only doing the required number of shifts per week?

    I have had a go myself by making a random generator for the week but it just duplicates names too much and i don't know how to set limits on this.

    I have attached what i have done so far.

    In an ideal world i would like to do this over 2 weeks and give everyone a weekend off that's fair and even.

    Thanks in advanced
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,043

    Re: Rota Generator

    Hello TomMartin123 and Welcome to Excel Forum.
    However staff work a different number of shifts each week which is also highlighted.
    If the number of shifts is supposed to be in column D on Sheet2, that column is blank except for the header.
    It may be easier to help if we could see a manually typed rotation so that we can use that as a guide in proposing formulas/code to automate the process.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    05-17-2024
    Location
    Exeter, England
    MS-Off Ver
    Office 2021
    Posts
    3

    Re: Rota Generator

    apologies i have attached again with number of shifts entered in the column.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-17-2024
    Location
    Exeter, England
    MS-Off Ver
    Office 2021
    Posts
    3

    Re: Rota Generator

    also there is no rotation. All that is required is that staff work the number of shifts they are contracted for over the 7 day period not working more than 1 shift per day

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,043

    Re: Rota Generator

    Someone may be able to come up with a solution that is closer to what you are looking for.
    On Sheet 2 add the following columns:
    1. Random populated using: =RAND()
    2. The columns with the number of days to be worked: =IF($D2<>F$1,"",SUMPRODUCT(($E$2:$E$26>$E2)*($D$2:$D$26=F$1))+1)
    3. The Map Ref column: =INDEX(F$1:I$1,AGGREGATE(15,6,(COLUMN(F$1:I$1)-COLUMN(E$1))/(F2:I2<>""),1))&"-"&INDEX(F2:I2,AGGREGATE(15,6,(COLUMN(F$1:I$1)-COLUMN(E$1))/(F2:I2<>""),1))
    On Sheet 1 the left table is manually populated such that the assignment arrangement may be changed without changing the random assignment of individuals.
    The right table is populated using: =INDEX(Sheet2!$C$2:$C$26,MATCH(B3,Sheet2!$J$2:$J$26,0))
    Note that cells highlighted in yellow indicate that assignment exceeds the number of days for that person because there are not enough people on the list.
    Let us know if you have any questions.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Excel Rota - Flagging when 6 shifts are set on rota in a row
    By Delta Foxtrot in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-21-2020, 05:55 AM
  2. Replies: 14
    Last Post: 05-23-2015, 06:26 AM
  3. Replies: 0
    Last Post: 04-07-2015, 11:39 PM
  4. Help with a rota
    By Jayblath in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2013, 07:34 PM
  5. Rota Help
    By MikeFord in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-14-2012, 08:16 AM
  6. Rota
    By -Doubleoseven- in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 03-14-2011, 05:34 PM
  7. Rota
    By noviceben in forum Excel General
    Replies: 1
    Last Post: 04-03-2007, 03:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1