Forum Discussion
What's wrong in this simple LAMBDA function?
- Jan 01, 2021
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.
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.
- HotCakeXJan 02, 2021MVP
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.
- PeterBartholomew1Jan 02, 2021Silver Contributor
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.
- HotCakeXJan 02, 2021MVPThanks, that was very helpful!