Locked lesson.
About this lesson
Learn to use LET to simplify complex formulas and make them easy to debug.
Exercise files
Download this lesson’s related exercise files.
Let Function - Begin.xlsx25.3 KB Let Function - Complete.xlsx
25.4 KB
Quick reference
The LET Function
The LET Function can be used to simplify complex formulas and make them easier to debug
Instructions
Benefits of the LET function
- It helps make formulas more readable
- It helps make complex formulas easier to debug
- It can make calculations more efficient
How it works
- The LET function works by declaring pairs of variables and calculations
- The final parameter of the LET function is the variable to return to the cell
Important Considerations
- Each variable must be a unique name
- Variable names cannot contain spaces
- While it is possible to use a calculation as the final function parameter, we recommend never doing this, rather using one of your variables as the final parameter (as this makes debugging MUCH easier!)
- The final parameter does NOT need to be the final parameter that was included in the function logic
Recommended LET function structure
=LET(
variable1_name, variable1_formula
[variable1_name, variable1_formula, …]
return, calculation,
return)
Example
- Assume you have the following COUNTIF() formula
=COUNTIF($D15:$D30,$C4)
- It could be written using a LET function as follows
=LET(
rngValues, $D15:$D30,
rngCriteria, $C$4,
return, COUNTIF(rngValues,rngCriteria),
return)
Login to downloadLesson notes are only available for subscribers.