+ Reply to Thread
Results 1 to 5 of 5

Dynamic dependent Validation List based in multiple tables and formulas

  1. #1
    Registered User
    Join Date
    12-13-2012
    Location
    Here and There
    MS-Off Ver
    Office 365 Home (Mac and Windows)
    Posts
    4

    Question Dynamic dependent Validation List based in multiple tables and formulas

    Hi,

    I've tried a few ways to make this work (using dependent drop-downs), but I haven't come even near to a solution, and would be grateful for any insight. The ideal solution should be based in formulas, to avoid using macro-enabled files altogether.

    You'll find a sample file attached with two structured tables, PROPOSALS and DOCS.

    1st Table, in the first Sheet, "PROPOSALS" have a unique index column (first one, "PROPOSAL_ID") that may not be sorted at all times and have two related fields "CUSTOMER_ID" and "AGREED":

    PROPOSAL_ID
    (unique text string, first column)
    CUSTOMER_ID AGREED
    (YES/NO)
    1 C YES
    2 B YES
    3 A YES
    4 A YES
    5 B NO
    6 A YES
    7 A NO
    8 C NO
    9 C YES
    10 B YES
    11 A NO


    2nd Table, in the second Sheet, "DOCS" also has a unique index column ("ID_DOC" - not the first as I can't move it, but I could add a new first column with a referenced copy, if necessary), a related field with the "CUSTOMER_ID" (relates to the first table) and a second related field ("RELATED PROPOSAL") that should populate with a validation list that lists "PROPOSAL_ID"'s of the "CUSTOMER_ID" on the left and that are marked with "AGREED" in the "PROPOSALS" table.


    DOC_DATE DOC_ID
    (unique, not first column)
    CUSTOMER_ID RELATED PROPOSAL
    (dependent dropdown Validation List with the entries below)
    (date) 222XYZ A (3, 4 and 6)
    (date) 333XYZ B (2 and 10)
    (date) 444XYZ D ("No Proposals")
    (date) 555XYZ A (3, 4 and 6)
    (date) 888XYZ C (1 and 9)

    Thank you in advance for any input
    Attached Files Attached Files
    Last edited by se7en___; 05-30-2018 at 04:50 PM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Dynamic dependent Validation List based in multiple tables and formulas

    This solution uses an Array Formula: =IFERROR(LEFT(SUBSTITUTE(CONCAT(IF(PROPOSALS[CUSTOMER_ID]=[@[CUSTOMER_ID]],PROPOSALS[PROPOSAL_ID]&",",FALSE)),FALSE,""),LEN(SUBSTITUTE(CONCAT(IF(PROPOSALS[CUSTOMER_ID]=[@[CUSTOMER_ID]],PROPOSALS[PROPOSAL_ID]&",",FALSE)),FALSE,""))-1),"No Proposal")

    The "derivation" of this formula is shown on the Proposals sheet. =SUBSTITUTE(CONCAT(IF(PROPOSALS[CUSTOMER_ID]=G3,PROPOSALS[PROPOSAL_ID]&",",FALSE)),FALSE,"")

    The formula looks at the customer ID and considers only those rows where the ID is equal to cell G3. I "add" a comma to to the row so I have some sort of a delimiter. The results come out as a mix of FALSE and matching IDs. So I use the substitute command to eliminate FALSE.

    The result has a trailing comma, so the LEFT(X,Len(X)-1) takes care of that.

    Finally, if there are no matches the formula yields #VALUE! Wrapping it in IFERROR takes care of that.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    12-13-2012
    Location
    Here and There
    MS-Off Ver
    Office 365 Home (Mac and Windows)
    Posts
    4

    Re: Dynamic dependent Validation List based in multiple tables and formulas

    Hi,

    Thank you very much for having a look at this - but either I'm not seeing it right, or it's not quite what I was looking for. I mean, the idea is to have a dropdown selection, based on a dynamic validation list. The examples I've put in are just placeholders, representing the actual options the list would display in each cell...

    Thanks

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Dynamic dependent Validation List based in multiple tables and formulas

    OK, here's a version that uses "joined" pivot tables.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-13-2012
    Location
    Here and There
    MS-Off Ver
    Office 365 Home (Mac and Windows)
    Posts
    4

    Re: Dynamic dependent Validation List based in multiple tables and formulas

    Again, thank you for for looking into it, but the problem I'm looking to solve is quite specific, and I see no way to apply these alternate solutions.

    The sample file is a mere simplification of a large dataset, where each cell I'm looking for a shortened validation list is currently populated with a validation list that spans the hundreds of results (i.e. right now it's easier just to copy/paste a value, but that takes quite some time). Both tables also have a large number of rows each. That is why I thought of trying to find a way of reducing the validation list dropdown size, to ease the process. But because I don't quite get how validation lists formulas handle arrays, I'm basically stuck with no solution.

    Thanks

    PS: One additional note, just for reference and unrelated to the original issue; consolidated data sources from multiple tables used in a single pivot table are currently unsupported in Outlook for Mac, and that's a big reason for me not using them right now.

+ 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 List Validation from Dynamic Named Ranges
    By freeride in forum Excel General
    Replies: 11
    Last Post: 01-22-2020, 03:07 PM
  2. [SOLVED] creating validation list from 2 different dynamic tables
    By jaryszek in forum Excel General
    Replies: 30
    Last Post: 02-12-2018, 02:41 AM
  3. Dependent Data Validation List with Dynamic Range
    By sakmsb in forum Excel General
    Replies: 1
    Last Post: 06-09-2015, 12:42 PM
  4. dynamic dependent validation list
    By ComeOnBee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-06-2015, 04:58 AM
  5. [SOLVED] Dynamic dependent data validation list
    By Masun in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-03-2014, 10:34 AM
  6. [SOLVED] Dependent Data Validation From Pivot Tables for multiple-line-use
    By Bertrand_V in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-07-2014, 01:48 PM
  7. Replies: 0
    Last Post: 02-13-2012, 07:18 AM

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