Forum Discussion

MarindaS's avatar
MarindaS
Copper Contributor
Feb 05, 2024
Solved

Assist with creating a formula to select a table to perform a Vlookup based on two conditions.

Good day   The client wishes to create a template to assist with comparison quotes in the insurance industry.  The client has an additional PDF document, containing Excess and Limit criteria. Which...
  • Patrick2788's avatar
    Feb 05, 2024

    MarindaS 

    If I understand the objective clearly, I think this will do it:

    =LET(
        area, XMATCH(B16, GeyserType),
        r, MAX(N(C16 = MasterKeys!$O$2:$R$5) * {1; 2; 3; 4}),
        limit, IFERROR(INDEX((Table2, Table24, Table4, Table5), r, 2, area), ""),
        IF(COUNTBLANK(B16:C16) >= 1, "", limit)
    )

    You may want to re-name your tables to give them descriptive names and then this formula reads even better.