Forum Discussion

KanwalNo1's avatar
KanwalNo1
Iron Contributor
May 15, 2022
Solved

Dependant Dropdown Using Dynamic Arrays

Hi Excel Gurus, I am trying to create a Dependent Dropdown List using Dynamic Arrays. When we select a client name in Column R, then column S should contain list of only related holder names. I have...
  • SergeiBaklan's avatar
    May 15, 2022

    KanwalNo1 

    What you try to generate in G10 that's array of array which is not supported by Excel, at least directly. There are different, but similar, techniques for workarounds. As variant, in your case it could be

    =LET(
        clients, UNIQUE(Table1[Client Name]),
        totalClients, ROWS(clients),
        holderName, LAMBDA(clientName,holders,clients,
            TRANSPOSE(FILTER(holders, clients=clientName)) ),
        fakeArray, LAMBDA(array, LAMBDA(array)),
        arrayOfFakeArrays, MAP( clients,
            LAMBDA(client,
            fakeArray( holderName( client, Table1[Holder Name], Table1[Client Name])))),
        result, MAKEARRAY( totalClients,9,
            LAMBDA(row,col,
                LET(getRow, INDEX(arrayOfFakeArrays,row,1)(),
                    INDEX(getRow,1,col)))),
        IFERROR( result, "")
    )

    You can't use arrays in data validation list, only ranges. More exactly references on them.

Resources