Forum Discussion
LBROWN7
Aug 30, 2023Brass Contributor
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
it indicates, "element not allowed inside an array"
Thanks
5 Replies
- SergeiBaklanDiamond Contributor
- LBROWN7Brass 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"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':