+ Reply to Thread
Results 1 to 8 of 8

Multi rule based selection

  1. #1
    Registered User
    Join Date
    09-13-2021
    Location
    Ljubljana
    MS-Off Ver
    Excel 2013
    Posts
    8

    Post Multi rule based selection

    Hello

    maybe I am not in the right place to ask this question. If so, please redirect me to the correct page.
    Also if there is an already existing topic that discuss same issue, I will be more than happy to be redirected there.

    I would like to create an automated excel spreadsheet for our sport event. We have many different teams form different countries and some game officials also from different countries.



    I would like to organize game referees based on their nationality, regardful to this rules:

    1. Game referee can't be the same nationality as the both teams are.

    2. Same game referee can't officiate two games at the same time.

    3. Same game referee can't officiate more than two games after each other.

    Please find an rough draft of the schedule below in the attachments.



    Basically what I would like to achieve is, that excel chooses a game official from the bank of officials by respecting those rules.

    Thanks for all your support and help

    Klemzy
    Attached Files Attached Files

  2. #2
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,427

    Re: Multi rule based selection

    I don't quite understand your request, is it necessary animation file Results ? Or something else

    Do you want to add more samples, especially if you request the following points, the examples are not illustrated

    1. Game referee can't be the same nationality as the both teams are.

    2. Same game referee can't officiate two games at the same time.

    3. Same game referee can't officiate more than two games after each other.

    Please watch this animation teaching file FILE name as S18.gif
    After the file is downloaded and decompressed, you can use the left mouse button to click twice to watch the teaching file (video) or open it with explorer.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-13-2021
    Location
    Ljubljana
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Multi rule based selection

    Ok, sorry I tought I was clear enough.
    The problem is: how to not do everything manually? How to make this process of arrangment atumated, so every time I change the teams I get a valid result for the referees.


    In column B you have national referees listed.
    I want to arrange referees into the column F. One referee per each game. It's important that all three rules are met, otherwise the result is not valid.
    It's not a problem if some referees won't be arranged.

    I hope I am clear enough.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,568

    Re: Multi rule based selection

    Hello Klemzy and Welcome to Excel Forum.
    This seems to work for the sample provided, with a modification to the setup of the games columns.
    1. Games are in column D with the two teams listed in columns E:F
    2. Column G displays the referee using**:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ** Denotes an array formula --> Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    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.

  5. #5
    Registered User
    Join Date
    09-13-2021
    Location
    Ljubljana
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Multi rule based selection

    Hey JeteMc, thanks for your response.
    The formula you provided works fine, only one problem appears:
    This formula stops working, when you spend all the available referees. So when you make more games (you do more combinations - let's say you set another 5 more games) it does not fill the referee, because it used all of them.
    See provided screenshot
    Excel-screenshot.png
    I know I did not specify this in the original post, for which I am sorry. I hope this does not complicate the formula too much.
    Thanks for all your help

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,568

    Re: Multi rule based selection

    Try pasting the following into cell G2, activating using the "**Array Formula" method in post #4, and then copying down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.

  7. #7
    Registered User
    Join Date
    09-13-2021
    Location
    Ljubljana
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Multi rule based selection

    I copied as you said, but i get this error message:
    Attachment 747945
    I am attaching the updated spreadsheet, so you can try to do it yourself if you also get the same error.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,568

    Re: Multi rule based selection

    Here is the file with the formula applied.
    Let us know if you have any questions.

+ 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: 5
    Last Post: 07-26-2020, 12:56 PM
  2. Filter columns based of drop down/multi selection
    By cessary in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2019, 04:53 PM
  3. Return multiple results based on multi-criteria selection
    By Macpic in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 10-19-2017, 12:33 PM
  4. Replies: 7
    Last Post: 08-26-2013, 11:38 PM
  5. [SOLVED] Formula Based on Multi-Level Data Validation Selection
    By warrior2411 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-07-2013, 08:34 PM
  6. [SOLVED] Multi Column Listbox change based on a selection from a combobox
    By AttalaEA in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-21-2012, 06:00 AM
  7. Multi select Listbox Items selection based on other Listbox item selection.
    By srinivassathi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2011, 05:53 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