Forum Discussion

deanstanberry's avatar
deanstanberry
Copper Contributor
Aug 02, 2024
Solved

Dynamic array and spilled array - FILTER function behavior

I am attempting to create a dynamic dependent data validation list (using instructions found on the My Online Training YouTube video).  A link to the file is found here.   On the Standards Categori...
  • Patrick2788's avatar
    Aug 02, 2024

    deanstanberry 

    If you keep your lists of categories and subcategories sorted, you can pull this off without the need to spill.

     

    Set up named items inside the table for category and subcategory then use this in data validation:

    =LET(
        first, XMATCH($A2, category),
        last, XMATCH($A2, category, , -1),
        r, last - first + 1,
        TAKE(DROP(subcategory, first - 1), r)
    )

    Data validation doesn't like dynamic arrays but will allow TAKE/DROP.

Resources