+ Reply to Thread
Results 1 to 9 of 9

Need formula to populate a schedule based on multi criteria! PLEASE!

  1. #1
    Registered User
    Join Date
    09-12-2015
    Location
    Portland, Oregon
    MS-Off Ver
    2013
    Posts
    4

    Red face Need formula to populate a schedule based on multi criteria! PLEASE!

    Hello, I have been researching all day and haven't found a formula populates a schedule based on the most senior persons shift and position preference. I've copied the data below to help someone understand what I am referring to. Each week the employees fill in their shift and position preferences and the supervisor goes through and makes the schedule based of this data. It's like human Sudoku! If anyone has a formula or advise on how to create a schedule that populates based of the preference data, I would be forever grateful!



    Senority 1st Shift 2nd Shift 3rd Shift Position 1 Position 2 Position 3 Position 4
    235 2 1 3 2 1 4 3
    236 3 2 1 3 4 1 2
    237 2 3 1 2 4 1 3
    238 2 1 3 1 3 4 2
    239 1 3 2 4 3 1 2
    240 1 3 2 2 4 1 3
    241 3 2 1 3 4 2 1
    242 2 1 3 4 3 2 1
    243 1 2 3 1 2 3 4
    244 3 1 2 1 3 4 2
    245 2 3 1 2 4 1 3
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Need formula to populate a schedule based on multi criteria! PLEASE!

    Can you write desired output (manually)?

  3. #3
    Registered User
    Join Date
    09-12-2015
    Location
    Portland, Oregon
    MS-Off Ver
    2013
    Posts
    4

    Re: Need formula to populate a schedule based on multi criteria! PLEASE!

    A schedule would be populated with the appropiate team members seniority number

    1st Shift 2nd Shift 3rd Shift
    Position 1 These fields would be
    Position 2 populated with seniority
    Position 3 numbers
    Position 4

    You can also see on the attached fileSchedule By Preference.xlsx

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Need formula to populate a schedule based on multi criteria! PLEASE!

    I got that.
    But write in those fields seniority numbers.. Like 235, 236...

  5. #5
    Registered User
    Join Date
    09-12-2015
    Location
    Portland, Oregon
    MS-Off Ver
    2013
    Posts
    4

    Re: Need formula to populate a schedule based on multi criteria! PLEASE!

    Oh! I get what your asking. I have manually populated it using our current process. It is ranked by Shift preference first, then each position. If no position is left in their first SHIFT preference we move to their second shift preference then start over with POSITION preference. Schedule By Preference.xlsx

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Need formula to populate a schedule based on multi criteria! PLEASE!

    Sorry, I don't see the logic

  7. #7
    Registered User
    Join Date
    09-12-2015
    Location
    Portland, Oregon
    MS-Off Ver
    2013
    Posts
    4

    Re: Need formula to populate a schedule based on multi criteria! PLEASE!

    First I choose the most senior person,
    He has given his shift preference a 1, 2 or 3 (1 being the most preferred and 3 being the least).
    He has also given his position preference a 1, 2, 3 or 4 (1 being the most preferred and 4 being the least).
    So for employee #235 he gets 1st shift on position 2.
    The next most senior person is #236 who prefers 3rd shift, position 3.
    As you go down the list you find that a person's first preference is filled already.
    For example:
    #237 prefers 3rd shift, position 3... But that is already filled by # 236
    His next position preference is position 1, which is open so he gets that spot.

    If a person’s shift preference is full, you then go to their next shift preference and start over on the position.

    ...you see why I want to automate this?!!!
    Here is a little color... hope it helps
    Schedule By Preference.xlsx

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Need formula to populate a schedule based on multi criteria! PLEASE!

    Here, use this.
    This is an UDF macro function and you can not use it in your workbook unless you copy code there.
    Or copy your data into this workbook
    that must be saved as .xlsm

    It works this way:

    Select range where you entering function: in this case M2:P6

    Then enter it as any other function:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In this case it would look like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And then confirm it by CTRL+SHIFT+ENTER (not just enter) so curely brackets {} appear around formula.
    Those brackets can not be written in formula. They must appear after confirming formula as explained.
    Attached Files Attached Files

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Need formula to populate a schedule based on multi criteria! PLEASE!

    As you can see I've add more data for testing.
    But 0's appear because there is no enough data in A column.
    You must take care to have enough data.

    So if you have 4 shifts and 5 positions then you need 20 (4*5) values.
    Not 12 as in this case or you get 0's.

    And you need to extend range also to match those 20 values.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by zbor; 09-13-2015 at 02:49 AM.

+ 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. Replies: 8
    Last Post: 02-08-2015, 09:08 AM
  2. Is there a formula that will populate a cell w/ TEXT based on multiple criteria?
    By violenttuesday in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2014, 03:46 PM
  3. Replies: 8
    Last Post: 12-18-2012, 05:18 AM
  4. Multi-range IF formula for determining a schedule
    By CEdwards2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-26-2012, 06:49 AM
  5. formula to pre-populate schedule
    By ch715a in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-08-2011, 06:22 AM
  6. Formula To Populate Data Based On Criteria
    By Kumara_faith in forum Excel General
    Replies: 2
    Last Post: 02-20-2011, 04:20 AM
  7. Schedule based on given criteria
    By leo73pk in forum Excel General
    Replies: 0
    Last Post: 06-30-2010, 07:47 AM

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