+ Reply to Thread
Results 1 to 12 of 12

Hide Used Items in Drop Down List

  1. #1
    Registered User
    Join Date
    07-30-2015
    Location
    England
    MS-Off Ver
    365
    Posts
    32

    Hide Used Items in Drop Down List

    Hi all,
    I have made a list of 29 players for my Fantasy League and there are six lists (one for each position) and when the user picks a position, only certain players will appear in the list. However, when a position is used more than once, I want the player to be available only once, so he cannot be repeated in the team. For example, in midfield, I have 5 players (player A to player E) and there are two midfield positions. When I select the first one, the list appears with players A-E and I select player B. Then, for the second one, the list appears with players A,C,D,E. Is this possible to happen? I have attached the document below. I have tried using: http://www.contextures.com/xlDataVal03.html but it is making no sense to me. I would be very grateful if someone could tell me what to do or complete a sample.

    Thank you!

    A League of their Own (1).xlsx

  2. #2
    Forum Contributor
    Join Date
    03-17-2005
    Location
    Canterbury, Kent
    MS-Off Ver
    2003, 2010
    Posts
    285

    Re: Hide Used Items in Drop Down List

    Have a look here http://www.contextures.com/xlDataVal03.html

    Windy

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Hide Used Items in Drop Down List

    Okay, since you have such short lists, I felt it would be okay if the used names just left gaps in the list. That makes things a lot simplier. On Squad, in E3, copied down (except where it says "Please Select..."

    =IF(ISNUMBER(MATCH($A3, '3-4-3'!$C$10:$C$20,0)), "", $A3)
    As soon as you use this name in sheet 3-4-3, it will disappear from this list.

    Now, I also needed to create a series of lists for every worksheet so I copied those formulas to the right (up to K) and just changed the sheet name in each column. Then I had to go back to each of your sheets and direct your data validation to the new columns. See attachment. Will this work for you?
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    07-30-2015
    Location
    England
    MS-Off Ver
    365
    Posts
    32

    Re: Hide Used Items in Drop Down List

    Quote Originally Posted by ChemistB View Post
    Okay, since you have such short lists, I felt it would be okay if the used names just left gaps in the list. That makes things a lot simplier. On Squad, in E3, copied down (except where it says "Please Select..."

    =IF(ISNUMBER(MATCH($A3, '3-4-3'!$C$10:$C$20,0)), "", $A3)
    As soon as you use this name in sheet 3-4-3, it will disappear from this list.

    Now, I also needed to create a series of lists for every worksheet so I copied those formulas to the right (up to K) and just changed the sheet name in each column. Then I had to go back to each of your sheets and direct your data validation to the new columns. See attachment. Will this work for you?
    Hi, thank you for that! However, it doesn't work for the substitutes and reserves. When the person has picked their starting eleven, they then need to pick their other players without the players they've already picked coming up again. Is this possible?
    Last edited by fffleague15; 08-05-2015 at 09:25 AM.

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Hide Used Items in Drop Down List

    It is but then you are going to have to do something like suggested on the link that confused you.

    Sure, Are the substitute and reserves picked from the entire squad or will there be one from this group, two from that group kind of thing? Sorry, I didn't scroll down and see those!

  6. #6
    Registered User
    Join Date
    07-30-2015
    Location
    England
    MS-Off Ver
    365
    Posts
    32

    Re: Hide Used Items in Drop Down List

    Quote Originally Posted by ChemistB View Post
    It is but then you are going to have to do something like suggested on the link that confused you.

    Sure, Are the substitute and reserves picked from the entire squad or will there be one from this group, two from that group kind of thing? Sorry, I didn't scroll down and see those!
    Hi mate, it doesn't matter about the white blank space! I'll just leave that, it looks fine how it is! The substitutes and reserves can be picked from any of the remaining players so it isn't determined by position except the first substitute which is a goalkeeper!

  7. #7
    Forum Contributor
    Join Date
    03-17-2005
    Location
    Canterbury, Kent
    MS-Off Ver
    2003, 2010
    Posts
    285

    Re: Hide Used Items in Drop Down List

    How about this...

    Have created named ranges for each group plus one covering all remaining players.

    Have added message to data validation which appears when a cell is selected.

    Windy
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Hide Used Items in Drop Down List

    Okay, since the reserve lineup would not have looked good with all those blank spaces, I decided to clean it all up.
    Here's what the new formulas do and then I'll give you the formulas. We'll look at goalkeepsing in a 3-4-3 formation (Column E of Squad)
    It compares each goalkeeper in A3:A5 to see if it's already been used, if not it assigns a number from 1 to 3. If it's been used, you get an error (which Excel later ignores). So if John Ruddy was used, it comes up with 1, Error, 3. It commits these to member (as an array). Then the formula says pull the smallest value and put it in E3, second smallest in E4 and so on.

    The ARRAY formula in E3 copied down to E5 is

    =IFERROR(INDEX($A$3:$A$5, SMALL(IF(ISERROR(MATCH($A$3:$A$5, '3-4-3'!$C$10:$C$20,0)), ROW($A$3:$A$5)-2), ROWS($A$1:$A1))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    I used this same technique to make a seamless list of reserves starting in E33 to E5
    See attachment. Is this good for you?
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    07-30-2015
    Location
    England
    MS-Off Ver
    365
    Posts
    32

    Re: Hide Used Items in Drop Down List

    Quote Originally Posted by windy58 View Post
    How about this...

    Have created named ranges for each group plus one covering all remaining players.

    Have added message to data validation which appears when a cell is selected.

    Windy
    Hi mate I really appreciate it but it gets confusing for me looking at that. I would rather use ChemistB's technique but if I can't then I will use yours mate. Thank you.

  10. #10
    Registered User
    Join Date
    07-30-2015
    Location
    England
    MS-Off Ver
    365
    Posts
    32

    Re: Hide Used Items in Drop Down List

    Quote Originally Posted by ChemistB View Post
    Okay, since the reserve lineup would not have looked good with all those blank spaces, I decided to clean it all up.
    Here's what the new formulas do and then I'll give you the formulas. We'll look at goalkeepsing in a 3-4-3 formation (Column E of Squad)
    It compares each goalkeeper in A3:A5 to see if it's already been used, if not it assigns a number from 1 to 3. If it's been used, you get an error (which Excel later ignores). So if John Ruddy was used, it comes up with 1, Error, 3. It commits these to member (as an array). Then the formula says pull the smallest value and put it in E3, second smallest in E4 and so on.

    The ARRAY formula in E3 copied down to E5 is

    =IFERROR(INDEX($A$3:$A$5, SMALL(IF(ISERROR(MATCH($A$3:$A$5, '3-4-3'!$C$10:$C$20,0)), ROW($A$3:$A$5)-2), ROWS($A$1:$A1))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    I used this same technique to make a seamless list of reserves starting in E33 to E5
    See attachment. Is this good for you?
    Hi mate! Thank you, it looks great but I am not sure whether to keep the top bit of the "Squad" page or do I just need the bottom bit? Also, do you think it would be best if I just duplicated the document to create a new team rather than sit through the formulas?? I really appreciate it

  11. #11
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Hide Used Items in Drop Down List

    You would need to keep both portions since the top bit is a series of smaller lists that shift as you use up the members within. I would advise you to use this as a template and just create new teams. Ranges might need to be shifted if they have a lot more players.

  12. #12
    Registered User
    Join Date
    07-30-2015
    Location
    England
    MS-Off Ver
    365
    Posts
    32

    Re: Hide Used Items in Drop Down List

    Quote Originally Posted by ChemistB View Post
    You would need to keep both portions since the top bit is a series of smaller lists that shift as you use up the members within. I would advise you to use this as a template and just create new teams. Ranges might need to be shifted if they have a lot more players.
    Hi mate. No, everyone is just going to have the same amount of players, so should I just keep everything as it is and change the players only? Thanks a lot!

+ 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] Hide Rows based off items from a ComboBox List.
    By Glitch_ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-17-2014, 09:27 AM
  2. Replies: 0
    Last Post: 04-22-2014, 11:03 PM
  3. Items used from a drop down list
    By vanmeterkj in forum Excel General
    Replies: 3
    Last Post: 05-17-2012, 01:50 AM
  4. Replies: 0
    Last Post: 08-07-2010, 04:13 AM
  5. Hide previously used items from multiple drop lists
    By ron in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-25-2006, 02:55 PM
  6. Hide previously used items from multiple drop lists
    By ron in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-27-2006, 05:20 PM
  7. Hide previously used items from multiple drop lists
    By ron in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-22-2006, 02:45 PM

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