+ Reply to Thread
Results 1 to 6 of 6

Data validation list with date condition

  1. #1
    Registered User
    Join Date
    01-02-2020
    Location
    Australia
    MS-Off Ver
    MS Office 365
    Posts
    7

    Data validation list with date condition

    Greetings Everyone,

    I regret to be one whose first post after joining a forum is to ask for help sorting out a problem, but alas, I'm stumped. I hope I can repay any assistance in kind in future.

    I've got a data validation list (G2) which is sourced from a named range (list_rp) of roster periods that are a concatenation of a start date and an end date - e.g 20/07/2019-16/08/2019.

    At the moment, the applicable roster period is near the top of the list. However, as the list is quite extensive, as time goes by the user is going to have to scroll through the list quite some way to find the current roster period - a source of great frustration for some, apparently. So, I'd like to incorporate a condition in the data validation list or its source data to exclude roster periods in the past, with the exception of the last three (prior to now). For example, assuming I was using the drop down list today and today is 2/1/2020, I'd like the data validation list to exclude the previous roster periods of 20/07/2019-16/08/2019 & 17/08/2019-13/09/2019 and commence the list with 14/09/2019-11/10/2019 and those that follow.

    I've attached an example workbook which probably demonstrates things a bit better. I'd appreciate any suggestions!

    Thank you in advance.

    Regards

    Ben
    Attached Files Attached Files
    Last edited by benlw1984; 01-02-2020 at 08:27 AM.

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

    Re: Data validation list with date condition

    I regret to be one who's first post after joining a forum is to ask for help sorting out a problem, ...
    Well, as it's a help forum, I regret to have to inform you that you aren't the first, in fact practically all members start with a plea for help.

    Welcome to the forum - I shall have a look at your workbook presently.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,242

    Re: Data validation list with date condition

    Somewhere else in the workbook (maybe on a hidden sheet) type this:

    =INDEX(list_rp,MATCH(TODAY(),$B$2:$B$85,1)-ROWS(A1:A$3))

    Drag copy down three rows.

    Now use this as your validation list reference.
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,959

    Re: Data validation list with date condition

    Use this as the DV formula in the named range:

    INDEX($A:$A,MATCH(TODAY(),$B:$B,1)-3):INDEX($A:$A,MATCH("zzz",$A:$A))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Registered User
    Join Date
    01-02-2020
    Location
    Australia
    MS-Off Ver
    MS Office 365
    Posts
    7

    Re: Data validation list with date condition

    Many thanks for the replies - problem solved!

    Regards

    Ben

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,959

    Re: Data validation list with date condition

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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] Multiple Condition Sum Between Dates that is dependent on a Data Validation List.
    By JarSanYou in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-11-2018, 10:02 AM
  2. Replies: 1
    Last Post: 05-20-2017, 10:29 AM
  3. Replies: 0
    Last Post: 10-14-2014, 08:39 AM
  4. Adding Date Data Validation to cells with List Data Validation
    By biggtyme in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-03-2013, 09:47 AM
  5. Replies: 1
    Last Post: 06-19-2013, 12:49 AM
  6. [SOLVED] using OR in the IF condition of a validation list
    By ggiorelli in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-13-2013, 06:46 AM
  7. Data Validation list with condition
    By vascobmcastro in forum Excel General
    Replies: 21
    Last Post: 08-16-2010, 12:18 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