LET

The LET function allows you to define named variables, assign the variables values/calculated results and reference them in an expression.

LET(name, value, name…, value…, calculation-or-name)

name: The name to give to the first variable to define.

value: The value assigned to the variable.

name…:Optionally include another variable to define.

value…: The value assigned to any other optional variables.

calculation-or-name: A name to give another variable to define or a calculation that uses names in the LET function. Must be the last argument.

Notes

  • At least one name/value pair must be defined, but LET supports up to 126 pairs.

  • LET allows you to define variable names that are represented as formula tokens. After they are defined, they can appear in type-ahead and be referenced elsewhere in the function.

Examples

Suppose an expense charges a £10 daily rate and you want to calculate the cost of that expense over a week. In the example below, Rate is the variable name, 10 is the value that’s assigned to that variable and Rate*7 calculates the weekly cost.

=LET(Rate,10,Rate*7) returns 70.

To separately calculate and compare the cost of that expense over a typical week, month and year, you can assign a variable to each period of time. In the examples below, the variable x and a value of 7 represent a week, the variable y and a value of 30 represent a month, and the variable z and a value of 365 represent a year.

=LET(Rate, 10, x, 7, y, 30, z, 365, Rate*x) returns 70, the cost for the week.

=LET(Rate, 10, x, 7, y, 30, z, 365, Rate*y) returns 300, the cost for the month.

=LET(Rate, 10, x, 7, y, 30, z, 365, Rate*z) returns 3650, the cost for the year.

To calculate the cost of that daily expense over a specific time frame — for example 2 years, 2 months and 2 weeks — the expression would read:

=LET(Rate, 10, x, 7, y, 30, z, 365, Rate*2*x + Rate*2*y + Rate*2*z).

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
ಉಪಯುಕ್ತವಾಗಿದೆಯೇ?
ಅಕ್ಷರ ಮಿತಿ: 250
ಗರಿಷ್ಠ ಅಕ್ಷರ ಮಿತಿಯು 250 ಆಗಿದೆ.
ನಿಮ್ಮ ಫೀಡ್‌ಬ್ಯಾಕ್‌ಗಾಗಿ ಧನ್ಯವಾದಗಳು.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.