+ Reply to Thread
Results 1 to 13 of 13

dynamic validation list under criteria

  1. #1
    Registered User
    Join Date
    03-13-2013
    Location
    Athens, Greece
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    30

    dynamic validation list under criteria

    Hello,
    please see attached file.
    After I type the date and the name in cells K2 and L2 respectively, I am looking for a validation list in M2 that will include all the countries that the specific name visited on that date.
    This is a sample file. The real file is much bigger with many different names, dates and countries.
    The purpose of validation is to help me avoid a typo mistake. The purpose of the dynamic list I described is to limit the number of countries that appear and save me time (in the real file I use, it could be more that 150 countries if I do not use the criteria)

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,034

    Re: dynamic validation list under criteria

    Try this file, which uses array formulas to extract the countries visited, and a dynamic named range to create the validation list.

    Validation.xlsx
    Last edited by Bernie Deitrick; 11-16-2015 at 11:27 AM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: dynamic validation list under criteria

    Is there a reason why you can't use the filters on the source data? Select the date you want, then the name, and the countries visited will be automatically shown.

    If you can't do it that way, the only way I can see to do what you want is first to extract the multiple results into another range, then use that range as the source for a drop-down list.
    Let's say you want to put the extracted list in column R. In R2 enter the following formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It's an array formula, so enter it with Ctrl-Shift-Enter not just Enter. You'll know it's worked if you get curly brackets {} round the formula in the formula bar - don't try to enter them yourself.
    You may need to replace the commas , with semi-colons ;
    Obviously, replace 'no other countries' with either "" (blank) or your chosen text.
    Drag this down as far as you want.

    Then use Data Validation 'List' to refer to this newly-created range.
    You may wish to consider making this range a Named Range and perhaps making it a dynamic range (search for 'dynamic range' for instructions on how to do that) - if you then use "" (blank) in the formula, all you'll get in the drop-down box is the countries.

    Here's your file showing the above working, with '09/01/15' and 'Bill' selected, so giving two results ('Greece' and 'Denmark'): Validation _ for petrosgeorgilas _ AS.xlsx

    Hope that's of some help.

    Edit: Bernie's solution above is much the same as mine (a slightly different formula with the same result), but he's been kind enough to do the dynamic range for you too!
    Last edited by Aardigspook; 11-16-2015 at 11:26 AM. Reason: Acknowledge previous post
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  4. #4
    Registered User
    Join Date
    03-13-2013
    Location
    Athens, Greece
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    30

    Re: dynamic validation list under criteria

    Thank you both for your feedback. The formulas are really interesting and very close to sth else I was looking for a couple of years ago!!!!
    Unfortunately, I do not think I can use them.
    The problem is that in the real file I will work with, columns K, L, M will have a lot of rows (everyday 10-20 rows will be added manually)
    At some point in time I will have hundreds or thousands of rows. I can't have a helping column for each row (unless there is a workaround assigning 20 columns for each new day?)
    Data entry for Columns K & L is easy to deal with. However, as time goes by, column M will practically have an infinite number of countries to chose from (in reality they are not countries but lot numbers). That is why I thought of this difficult validation approach.
    Thanks again for your time and effort.

  5. #5
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,034

    Re: dynamic validation list under criteria

    The formulas can work with thousands of rows - even tens or hundreds of thousands of rows. Since one of your filters is a date, and you are adding 10-20 per day, then the most returned lot numbers should be around 20 - easy for Excel.

  6. #6
    Registered User
    Join Date
    03-13-2013
    Location
    Athens, Greece
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    30

    Re: dynamic validation list under criteria

    There will not be just K2:M2. In a few months there will be K2000:M2000 or K10000:M10000.
    Unless I am missing something, doesn't this mean that I will need 2000 or 10000 helping columns?

  7. #7
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,034

    Re: dynamic validation list under criteria

    You need to better describe your work process. When you enter values into K2:L2, then get a drop down on M2, when you select the value in M2, are you done with row 2? Why would you need as many rows in K:M as you have data? Wouldn't that just be replicating the data?

  8. #8
    Registered User
    Join Date
    03-13-2013
    Location
    Athens, Greece
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    30

    Re: dynamic validation list under criteria

    When I enter K2:L2 then a drop down will appear on M2. I will select what I want and I am done.
    Then I will enter K3:L3 with a different set of date and name. So the list will have to be different for M3.

  9. #9
    Registered User
    Join Date
    11-11-2015
    Location
    Southend
    MS-Off Ver
    2013
    Posts
    52

    Re: dynamic validation list under criteria

    Here is a quick check to see if you have used the name before
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    03-13-2013
    Location
    Athens, Greece
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    30

    Re: dynamic validation list under criteria

    Sorry Graham. This is not what I am looking for

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: dynamic validation list under criteria

    Try this formula in L2 and fill down as far as required.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Array formula enter with Ctrl + Shift + Enter
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  12. #12
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,034

    Re: dynamic validation list under criteria

    This one will change the validation list as you fill in the columns, based on the last row K:L

    Progressive Validation.xlsx

  13. #13
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: dynamic validation list under criteria

    Replace the formula I gave you in post 3 with this amended version:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Change each instance of $100 to be as large as you need ($1000, $10000 or even larger).
    It's still an array formula entered with Ctrl-Shift-Enter but now you should drag it right not down.
    I put the first formula in R2, which is important for the next step.

    Now go to Name Manager and create a new name (I called it 'ListForColumnM') and in the 'Refers to' box, put this:
    =OFFSET(Sheet1!$M2,0,5):OFFSET(Sheet1!$M2,0,15)
    If you've put the first formula in a column other than R, you'll need to adjust the first offset (if S replace 5 with 6, if T replace 5 with 7, and so on). This will give you a ten-value drop-down list (in the next step) - if you think there will be more, then adjust the second offset.
    (It's probably possible to make it dynamic, but my brain doesn't seem to be working for that step )

    Now select cell M2, click Data Validation, select 'List' and enter this in the range/formula box: =ListForColumnM

    You can now drag M2 down as far as you want and you'll get a drop-down box based on the list to the right of each drop-down box.
    See the attached file which has some extra examples: Validation _ for petrosgeorgilas _ AS v2.xlsx

    Hope this is more like what you need.

+ 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] Dynamic Validation List based on Criteria
    By Steve Bowden-Jones in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 10-01-2014, 03:17 AM
  2. validation for dynamic list with criteria
    By nikenis in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-24-2013, 10:22 AM
  3. Replies: 0
    Last Post: 04-15-2013, 09:22 AM
  4. [SOLVED] Create Dynamic Data Validation List based upon Criteria
    By stubbsj in forum Excel General
    Replies: 6
    Last Post: 06-04-2012, 08:33 AM
  5. Replies: 0
    Last Post: 02-13-2012, 07:18 AM
  6. Replies: 3
    Last Post: 08-21-2011, 08:22 PM
  7. [SOLVED] Changing named Validation list to Dynamic list.
    By GlenC in forum Excel General
    Replies: 1
    Last Post: 07-20-2006, 06:55 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