Forum Discussion

LBROWN7's avatar
LBROWN7
Brass Contributor
Aug 30, 2023

Element not allowed inside an array in a LAMBDA function

Can anyone advise why   the array expression {a,b} in the LAMBDA expression below generates an error.

=LAMBDA(a,b,IF(a<b,{0,0},{a,b}))(1,2)

it indicates, "element not allowed inside an array"

Thanks

5 Replies

    • LBROWN7's avatar
      LBROWN7
      Brass Contributor

      Thanks!! This is correct.
      If a & B are names ={a,b} fails, but ={1,2} works!!

      Follow up Question is this issue concerning the Excel Braces Array Constructor only working with numbers documented anyplace?

      Thanks

      • LBROWN7 

        "Excel Braces Array Constructor only working with numbers"

         

        That is not entirely correct. It works only with constant values, including text strings, TRUE/FALSE and error values. For example, the following is valid:

         

        {"Excel", 37, TRUE, #N/A}

         

        See Guidelines and examples of array formulas section 'Array constant syntax':

Resources