Assigns names to calculation results. This allows storing intermediate calculations, values, or defining names inside a formula. These names only apply within the scope of the LET function.
=LET(Name1; Name_value1; Calculation_or_Name2 [; Name_value2; Calculation_or_Name3 [; ...]])
Name1: the first name to assign. Must start with a letter. Cannot be the output of a formula or conflict with range syntax.
Name1 must follow the naming rules of LibreOfficeDev Calc.
Name_value1: the value or calculation to assign to Name1.
Name2; Name_value2;...: (optional) same as Name1 and Name_value1, respectively. Name_value2 must follow Name2 and so on.
Calculation: a formula expression that uses all names within the LET function.
Calculation must be the last argument in the LET function.
Suppose we have a extensive calculation such as
=COS(PI()*EXP(A1+35)/180)
and we want to compute
The formula for y would be =COS(PI()*EXP(A1+35)/180)^3 + COS(PI()*EXP(A1+35)/180)^2 + COS(PI()*EXP(A1+35)/180) + 1
Using the LET function, it becomes =LET(x,COS(PI()*EXP(A1+35)/180),x^3+x^2+x+1)
COM.MICROSOFT.LET