LET Function in LibreOffice Calc — Tested Examples
An explanation of LibreOffice Calc LET, including tested formulas, examples, expected results and common mistakes.
Tested: Examples checked in LibreOffice Calc 25.2.3.2. What this means
The LET function 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 creates temporary names within the formula. Naming amount=3 yields 12 after multiplying by 4; price=20 and quantity=3 produce 60.
Syntax and arguments
=LET(Name_1; Name_value_; Calculation_or_Name_)
LibreOffice Calc formulas generally separate arguments with semicolons (;).
| Argument | Explanation |
|---|---|
Name 1 |
The first name to assign. Must start with a letter. Cannot be the output of a formula or conflict with range syntax. |
Name value |
Name value 1, Name value 2,… The value or calculation to assign to Name. |
Calculation or Name |
A calculation that uses all names within the LET function. This must be the last argument in the LET function. Or a second Name to assign to a second Name value. If a second Name is specified, Name value 2 |
Worked examples
Example 1: Name an intermediate value and reuse it
=LET(amount;3;amount*4)
Expected result: 12. This value was returned in the LibreOffice Calc 25.2 test.
Example 2: Reuse two named values
=LET(price;20;quantity;3;price*quantity)
Expected result: 60. This value was returned in the LibreOffice Calc 25.2 test.
How to interpret the result
LET creates temporary names within the formula. Naming amount=3 yields 12 after multiplying by 4; price=20 and quantity=3 produce 60.
Mistakes and troubleshooting
- Check inputs and assumptions: The last argument must evaluate the result. Names cannot conflict with cell addresses.
- Check argument order and format: Strings go in quotes, cell references do not. Functions that return arrays may require special entry.
- Verify your own data: Reproduce the example first. If your formula returns an error, inspect the referenced cells and individual argument values.
Related functions
Tested version and primary reference
This function is available since LibreOffice 24.8, according to the LibreOffice function documentation.
2 example(s) on this page passed real calculations in LibreOffice Calc 25.2.3.2. This is not a claim about every possible input or other spreadsheet applications.