Search notes:

Excel function: let

The Excel function let allows to declare variables and then use their values within the function.
Assign 17 to x, 13 to y, then calculate x*y:
=let( x; 17 ;  y; 13 ;   x*y )
It's possible to assign the returned value of an Excel function to a variable.
Here, the string "Hello world" is assigned to txt, then the length of that string is evaluated with the function len() and assigned to the variable txtLen, finally, a string which is assembled of text constants and the values of the variables is returned.
=let( txt; "Hello world" ;  txtLen; len(txt) ; "The length of '" & txt & "' is " & txtLen )

See also

Excel worksheet functions

Index