LET(name1, name1_value, formula_or_name2 [,name2_value, formula_or_name3])

Returns the result of a formula that can use variables.

name1The name of the first variable.
name1_valueThe value or expression to assign to the first variable.
formula_or_name2The formula that uses the "name1" variable or the name of the second variable
name2_value(Optional) The value or expression to assign to the second variable.
formula_or_name3(Optional) The formula that uses both the "name1" and "name2" variables or the name of the third variable.

Remarks

* This function is only available in Microsoft 365.
* This function allows you to call the expression by name and for Excel to calculate it once.
* For the Microsoft documentation refer to support.office.com

 AB
1=LET(varname, 5, SUM(varname, 1)) = 610
2=LET(varname, 5, varname+1) = 620
3=LET(varname, 5, varname+100) = 10530
4=LET(varname, 5, B1+B2+varname) = 2550
5=LET(varname,B1, varname+1) = 1160
6=IF(SUM(B1:B5)>100,SUM(B1:B5),"less than 100") = 170 
7=LET(varname,SUM(B1:B5),IF(varname>100,varname,"less than 100")) = 170 
8=LET(varname1,10,varname2,20,varname1 + varname2) = 30 


© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited Top