SOLVED

What's wrong in this simple LAMBDA function?

MVP

I was reading this article and trying out the new feature

LAMBDA function - Office Support (microsoft.com)

I decided to do something super simple like this but it throws and error message that's shown on the picture

 

1.jpg

 

But this one works just fine

 

2.jpg

 

as you can see, If i remove the numbers from my parameters, the error is gone, but I want to use numbers and letters in my parameters.

 

 

4 Replies
best response confirmed by HotCakeX (MVP)
Solution

You are lucky to have the LAMBDA function to test! I am still waiting - impatiently. As a first thought I would suggest that using cell references for names is asking for trouble. If you want brief names I would expect

= LAMBDA(n₁, n₂, n₁+n₂)(2,2)

to work.

Hi,

Thank you, I wasn't aware at all that the parameter name (variable name) I chose was actually referring to a very distant cell name in Excel sheet.

 

any tips on how to avoid choosing an Excel cell name when deciding to type a parameter name?

because if the cells are infinite, they could potentially contain lots of words + numbers combinations.

 

 

I'm using Office 365 and joined Insider Beta channel by the way.

@HotCakeX 

No profound advice I am afraid.  Just avoid names with three characters followed by up to 7 digits as well as R or C used by themselves.  It is particularly galling for me because my house style forbids the practice of direct cell referencing, if for no better reason that almost all the 17 billion possible cell names refer to unseen areas of the sheet that are not even part of my model and would therefore represent errors. 

 

I have found the Unicode characters provided by Insert>Symbol to be a rich source of possible names.  For example, adding modifiers or subscripts can make the name illegal as a cell reference and thus, legal as a name.  For example

∞, ltr∕hr, x₁, π, ϑ, R̅

all work as names.  The downside is that they are inconvenient to generate with the keyboard;  F3 or IntelliSense are still options though.

Thanks, that was very helpful!
1 best response

Accepted Solutions
best response confirmed by HotCakeX (MVP)
Solution

You are lucky to have the LAMBDA function to test! I am still waiting - impatiently. As a first thought I would suggest that using cell references for names is asking for trouble. If you want brief names I would expect

= LAMBDA(n₁, n₂, n₁+n₂)(2,2)

to work.

View solution in original post