Summary
In this video we look at the LET function for creating variables.
EXAMPLE FILE: Modern Excel Formulas – Start.xlsx > Example
The LET function assigns calculation results to names that can be reused within a formula.
The Syntax for LET is:
=LET(name1, value1, [name2], [value2], …, calculation)
- name1: The first name.
- value1: Value assigned to name1.
- [name2]: The second name.
- [value2]: Value assigned to name2.
- … : Ongoing pairs of names and values.
- calculation: The calculation or value to return.
Names must start with a letter, or an underscore, and cannot conflict with other name or range references (e.g. A1 is not a valid name)
Why use LET:
- Improved performance – Calculate a value once and reuse multiple times.
- Easier to read – Allocation of meaningful names to parts of a formula.