Dynamic Look Up with Multiple Criteria: <>, =, >, >=, <, <= as Sign Inputs and an Input Value Cell
19:44 30 Nov 2025

I have a workbook with 2 tabs: an Override tab and a Calculation Detail tab. I am trying to create a formula that returns "Y" or "N" in the parameter_# field of the Calculation Detail tab if a given loan_id meets the criteria inputted for that Adjustment # in the Override Tab.

For example, for loan_id 292484674, I want cell X22 to calculate: IF(AND(G22>=1,H22="N",I22<=0.8,J22<>"NPL",K22<>"LDTV",L22<>"NPL_LDTV"),"Y","N")

The working function I have is laid out in Working Parameter Criteria Formula below. This function is returning a #REF error when the criteria inputs on my Override Tab are set to anything other than <> for the sign input and [null] for the value input for each criteria (i.e. column D of the Override Tab). Any help in getting this function to work whilst keeping it dynamic so the user can toggle the sign and value for each criteria and each adjustment on the Override tab is appreciated.

Override Tab

enter image description here

Calculation Detail Tab

enter image description here

Working Parameter Criteria Formula (Cell X22)

=LET(adj, X$2,
         col, MATCH(adj, adjustment_range, 0),
         sign_rows, VSTACK(Overrides!$B$14:$K$14,Overrides!$B$16:$K$16,Overrides!$B$18:$K$18,Overrides!$B$20:$K$20,Overrides!$B$22:$K$22,Overrides!$B$24:$K$24),
         val_rows, VSTACK(Overrides!$B$15:$K$15,Overrides!$B$17:$K$17,Overrides!$B$19:$K$19,Overrides!$B$21:$K$21,Overrides!$B$23:$K$23,Overrides!$B$25:$K$25),
         inputs, HSTACK($G22:$L22),
         sign_col, TAKE(sign_rows,,col),
         val_col, TAKE(val_rows,,col),
         row_results,
         BYROW(HSTACK(sign_col, val_col, inputs),
                        LAMBDA(r,
                        LET(s, INDEX(r,1),v, INDEX(r,2),inp, INDEX(r,3),
                    IF(v = "",
                        TRUE,
                        inp & INDIRECT(s & v))))),
                   IF(AND(row_results),"Y","N"))
excel