+ Reply to Thread
Results 1 to 4 of 4

Dependent Data Validation question

  1. #1
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421

    Dependent Data Validation question

    I have a list of dates in chronological order and is a dynamic range called "Dates". I want to have two data validation dropdowns, for a starting date and an ending date. My question is - how can I ensure the validation list for the ending date are only those dates AFTER the date selected in the Starting Date validation dropdown?
    I help because of the Pavlovian dog that resides in the inner me...so if you are happy with the results, please add to my reputation. It helps keep me motivated!



    Please mark your threads as Solved once it is solved. Check the FAQ's to see how.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Dependent Data Validation question

    Dynamic named ranges using OFFSET is usually the easiest way to accomplish this.

    Assuming
    1) on Sheet1 you have a list of dates in column I start in I1 and going downward any length
    2) In B2 you will use a drop down to select a starting date from that list
    3) In B3 you want a second drop down to ONLY show the remaining dates in the list

    you create two dynamic named ranged.

    1) Open the Name Manager (Ctrl+F3)
    2) New > Name = AllDates > RefersTo: =OFFSET(Sheet1!$I$1, , , COUNT(Sheet1!$I:$I), )
    3) New > Name = RemainingDates > RefersTo: =IF(Sheet1!$B$2>0, OFFSET(AllDates,MATCH(Sheet1!$B$2,AllDates,0),,COUNT(AllDates)-MATCH(Sheet1!$B$2,AllDates,0),))

    4) Close the Name Manager
    5) Select B2 and use the Data Validation settings: Allow = List > Source = AllDates
    6) Select B3 and use the Data Validation settings: Allow = List > Source = RemainingDates

    That should do it.


    TO apply this in a different layout, make note of AllDates and how it refers to the first cell of the list dates, then refers that entire column. Edit that.
    Then note how RemainingDates refers to the CELL where you are going to use the AllDates, in my example that is B2. Edit that.
    Last edited by JBeaucaire; 05-30-2018 at 01:01 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Dependent Data Validation question

    Hello,

    you can do that with another dynamic range name for end dates

    Please Login or Register  to view this content.
    See the screenshot
    2018-05-30_16-45-19.jpg

    cheers, teylyn

  4. #4
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421

    Re: Dependent Data Validation question

    Great guys - Thank you both!

+ 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: 1
    Last Post: 01-14-2018, 11:04 AM
  2. [SOLVED] Dependent Data Validation
    By MTS4 in forum Excel General
    Replies: 8
    Last Post: 01-10-2016, 01:27 PM
  3. Data validation with dependent
    By Haha88 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-19-2015, 07:10 PM
  4. [SOLVED] Dependent Data Validation
    By lornaerland in forum Excel General
    Replies: 6
    Last Post: 09-22-2014, 11:27 AM
  5. [SOLVED] Dependent dropdown validation - dependent data is string
    By jnewby in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-12-2014, 07:50 PM
  6. [SOLVED] Data Validation Dependent on Other Validation
    By CKRebel in forum Excel General
    Replies: 6
    Last Post: 07-11-2012, 10:41 AM
  7. Dependent data validation question
    By MGT2000 in forum Excel General
    Replies: 5
    Last Post: 01-06-2009, 07:39 PM

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