Hello,
Suppose I want to test if a particular cell, say B2, is equal to any one of a few numbers or not, such as below:
=IF(OR(B2=10,B2=11,B2=12),operation_if_true,operation_if_false)
However, the number of the conditions may not always be 3, so I need to create an expression that automatically generates an OR() statement with the number of conditions matching the count of an input array; perhaps something like below:
=LET(x,{10,11,12,13,etc.},y,formula_to_generate_OR_with_n_conditions,IF(y,operation_if_true,operation_if_false))
I got stuck trying to code for "formula_to_generate_OR_with_n_conditions". I was thinking possibly MAP or MAKEARRAY?
Thanks for any input!
Suppose I want to test if a particular cell, say B2, is equal to any one of a few numbers or not, such as below:
=IF(OR(B2=10,B2=11,B2=12),operation_if_true,operation_if_false)
However, the number of the conditions may not always be 3, so I need to create an expression that automatically generates an OR() statement with the number of conditions matching the count of an input array; perhaps something like below:
=LET(x,{10,11,12,13,etc.},y,formula_to_generate_OR_with_n_conditions,IF(y,operation_if_true,operation_if_false))
I got stuck trying to code for "formula_to_generate_OR_with_n_conditions". I was thinking possibly MAP or MAKEARRAY?
Thanks for any input!