+ Reply to Thread
Results 1 to 19 of 19

data validation with condition

  1. #1
    Forum Contributor
    Join Date
    04-23-2007
    Location
    Texas
    Posts
    417

    data validation with condition

    I would like to create a cool line up sheet/player position list.

    I have a data range named "Field1". In this range of cells I have validation boxes laid out in field positions.

    1 cell below each validation box is the initials of the field position. (This could work for any field lay out...baseball,basketball court,football.etc..)

    In column B is where the players first name is located and is the validation boxes list. Range name "FirstN"

    What I would like to do is when I use the drop down list and pick a name, the position goes in Column E on the same row as the persons name in column C and at the same time strike through the name in column C to identify the player has been placed in a position.
    Last edited by Tortus; 06-03-2016 at 01:18 PM.
    If we all use our Minds our Heads and our Brains NO TELLING what we could come up with!!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,017

    Re: Sports sheet!

    Attach what you've got so far.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    04-23-2007
    Location
    Texas
    Posts
    417

    Re: Sports sheet!

    HTML Code: 
    Attached Files Attached Files
    Last edited by Tortus; 06-03-2016 at 01:05 PM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,017

    Re: Sports sheet!

    To attach a sample workbook:

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Forum Contributor
    Join Date
    04-23-2007
    Location
    Texas
    Posts
    417

    Re: Sports sheet!

    ok, I've added the link!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,017

    Re: Sports sheet!

    Where have you added it???

  7. #7
    Forum Contributor
    Join Date
    04-23-2007
    Location
    Texas
    Posts
    417

    Re: Sports sheet!

    Sorry! Now it is there.

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Sports sheet!

    Quote Originally Posted by AliGW View Post
    Where have you added it???
    Post #3, Ali.

    @Tortus, could you edit your thread title to something more meaningful in line with the forum rules please. Not following exactly what you're looking for yet, but something like 'data validation with condition' should keep the hounds at bay even if it's not strictly accurate

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,017

    Re: Sports sheet!

    Ah, yes - spotted it now. Unfortunately, I'm just about to log off for the evening. Maybe have a look tomorrow.

  10. #10
    Forum Contributor
    Join Date
    04-23-2007
    Location
    Texas
    Posts
    417

    Re: Sports sheet!

    You are correct.. I used what you have suggested.

  11. #11
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: data validation with condition

    First part, in E16 and copied down

    =IFERROR(INDEX($J$2:$AU$41,SUMPRODUCT(($J$1:$AU$40=$C16)*ROW($J$1:$AU$40)),SUMPRODUCT(($J$1:$AU$40=$C16)*(COLUMN($J$1:$AU$40)-COLUMN($J$2)+1))),"")

    Still trying to figure out what you've done with the validation cells in order to clear the used names.

    You can't format the dropdown list with a strikethrough font, the only way to eliminate double entries would be to exclude names from the dropdown that have a position listed in column E.

  12. #12
    Forum Contributor
    Join Date
    04-23-2007
    Location
    Texas
    Posts
    417

    Re: data validation with condition

    ok, is it possible to just highlight the ones used in the list? maybe green?

  13. #13
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: data validation with condition

    Sorry, I should have been a bit more specific with my comment.

    It's not just strikethrough that you can't use, you can't apply any kind of formatting to the dropdown list.

    Just making a few changes to the vba code you have in the sheet so that it will take care of the validation for you.

  14. #14
    Forum Contributor
    Join Date
    04-23-2007
    Location
    Texas
    Posts
    417

    Re: data validation with condition

    I've got it! If value of E has text - highlight B - E, would that work?

  15. #15
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: data validation with condition

    You could do that with conditional formatting, using a simple rule

    =LEN($E16)>0

    Applied to B16:E32

    But the highlight would only show in that list, and not in the dropdown, so it would depend how attentive the user is. There would still be nothing to stop them entering a name twice.

  16. #16
    Forum Contributor
    Join Date
    04-23-2007
    Location
    Texas
    Posts
    417

    Re: data validation with condition

    I see what you mean. The condition formatting would work for v1. I'll leave it open for a bit in case someone else has an idea. There is no way to link the Error message box that would warn the user that the name is already used in Field1?

  17. #17
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: data validation with condition

    See how this works for you.

    Right click the 'LineUp' tab, then click 'View Code'

    Delete the sorting code that is already there, and replace it with this code (it takes care of the sorting and the validation).

    Please Login or Register  to view this content.
    The code re-writes the list of names in the validation dropdown on the fly, so it only ever shows unused names.

    The only thing that this doesn't allow for is 2 (or more) players with the same first name.

  18. #18
    Forum Contributor
    Join Date
    04-23-2007
    Location
    Texas
    Posts
    417

    Re: data validation with condition

    There is another way but I'm not sure the formula. How do I condition format column E to show msgbox when a 0 is present in a cell?

  19. #19
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: data validation with condition

    You wouldn't be able to do that with conditional formatting.

    The only message box of any kind that can be triggered without vba is the one in data validation, depending on how you set it up.

    That would be based on the validation conditions though, and you would need to be able to apply 2 validation conditions to one cell to make it work, which, to the best of my knowledge, is not possible.
    Last edited by jason.b75; 06-03-2016 at 02:53 PM.

+ 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] Sports Ladder Sheet Help
    By cgfw201 in forum Excel General
    Replies: 12
    Last Post: 10-19-2015, 10:37 AM
  2. Help with the math on a sports related sheet
    By jhammond10 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-30-2015, 11:42 PM
  3. HELP in Getting The Top 3 Most Sports
    By Windell in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2014, 08:47 AM
  4. Replies: 1
    Last Post: 11-19-2013, 05:09 AM
  5. Replies: 1
    Last Post: 11-26-2012, 04:34 PM
  6. [SOLVED] Creating Sports League Standings from Schedule Results Sheet - Please Help Put it Together
    By javacious in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-03-2012, 05:06 PM
  7. [SOLVED] sports score sheet
    By rc in forum Excel General
    Replies: 1
    Last Post: 05-12-2005, 05:06 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