+ Reply to Thread
Results 1 to 9 of 9

Validating the Validation (Data Dependent Drop Down Lists)

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2021
    Posts
    1,013

    Validating the Validation (Data Dependent Drop Down Lists)

    Hi,

    I've inherited a data template which incorporates a number of data dependent drop down lists. Unfortunately due to the limitations of data dependent drop down lists (can be circumvented via copy/paste and/or drag down) the majority of returns I receive contain errors which I then have to identify and correct. Is there a formula I can use that effectively checks that the options selected are valid? The attached spreadsheet shows a smaller example of the data I'm working with. The actual data drops down to 6 levels.

    Thanks in advance,

    Snook
    Attached Files Attached Files
    Last edited by The_Snook; 04-21-2016 at 05:22 AM.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,908

    Re: Validating the Validation (Data Dependent Drop Down Lists)

    You could use something like the below in cell D4.
    Formula: copy to clipboard
    =IF(COUNTIF(INDIRECT(C2),C4)=0,"Error","")


    It will check if the value is a valid entry for the specific data validation list and show "Error" if not.

    Not a perfect solution, but may prompt the user to fix the error of their ways.

    BSB

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Validating the Validation (Data Dependent Drop Down Lists)

    You could use a formula like this in C6:

    =IFERROR(ISNUMBER(MATCH(C4,INDIRECT(C2),0)),FALSE)

    This will return TRUE or FALSE.

    Hope this helps.

    Pete

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,699

    Re: Validating the Validation (Data Dependent Drop Down Lists)

    Try

    =IFERROR(MATCH($C$2,Position,0),"Invalid Input")

    will error if Position not found in "Position" table

  5. #5
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2021
    Posts
    1,013

    Re: Validating the Validation (Data Dependent Drop Down Lists)

    Thanks all. How would the formula change if I added another validation layer into the data?

    NB - I've uploaded an amended workbook to reflect this.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,699

    Re: Validating the Validation (Data Dependent Drop Down Lists)

    Try

    =IFERROR(AND(MATCH($C$2,Position,0),MATCH($C$6,Height,0)),"Invalid Input")

    I created named range "Height". If there "Heights" depending on position, then it gets more complex

  7. #7
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2021
    Posts
    1,013

    Re: Validating the Validation (Data Dependent Drop Down Lists)

    Thanks John. I've incorporated the AND function as you suggested and the formula below seems to work based on my example. Presumably now I just need to adapt it to fit my actual data and incorporate multiple MATCH criteria for each level.

    =ISNUMBER(--AND(
    MATCH(C4,INDIRECT(C2),0),
    MATCH(C6,INDIRECT(SUBSTITUTE(C4," ","_")),0)
    ))

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,699

    Re: Validating the Validation (Data Dependent Drop Down Lists)

    Try it! depending on the complexity VBA might be an option (WorkSheet_Change).

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

    Re: Validating the Validation (Data Dependent Drop Down Lists)

    is the template to be stored in a secure location? In all my official spreadsheets, I set up an Instruction Page or Users Guide and Save it so that that is the page that opens for the user. See attached.

    It also helps to keep an "idiot stick" near your desk.
    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

+ 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. Dependent Drop Down Lists/Validation
    By chasmac in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-03-2014, 03:34 PM
  2. Duplicate, Dependent/Related/Interconnected Data Validation (Drop Down Lists)
    By dilbert1865 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-06-2014, 10:51 AM
  3. Replies: 2
    Last Post: 09-07-2013, 03:55 AM
  4. [SOLVED] Dependent Drop Down Lists, Data Validation, Reset Dependents
    By daxlyon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-12-2013, 11:15 AM
  5. Data Validation dependent lists
    By ceruppel in forum Excel General
    Replies: 4
    Last Post: 01-03-2013, 09:55 PM
  6. [SOLVED] Data Validation using multiple dependent drop down lists
    By ceruppel in forum Excel General
    Replies: 4
    Last Post: 12-17-2012, 06:39 PM
  7. Data map (three dependent validation lists)
    By cpurvis in forum Excel General
    Replies: 3
    Last Post: 12-11-2006, 03:16 AM

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