Helping millions of people navigate the world of technology.

How to Use Microsoft Excel’s LET Function to Simplify Complex Formulas

Quick Tips
  • The main benefit of the function is customizing inputs and variables, simplifying formulas that depend on a particular cell across rows and columns.
  • The LET function can also increase performance by reducing redundant or repetitive calculations.
  • You can also use the function to store results in-between calculations, which can be helpful if you don’t want to publicly display them.

If you’ve ever had an Excel formula that seems to drag on forever, you’re hardly alone. While Excel is arguably one of the best spreadsheet programs, the formula entry box can be comically small.

That’s where you can use the LET function to simplify the most common calculations. Here are some Excel LET function examples and where you might need to use them.

What Is LET for in Excel?

The LET function allows you to assign a name to one or more variables that are being created by calculating a result of an operation over two or more fixed cells.

From a technical standpoint, the formula’s syntax looks as follows:

=LET(name1, name_value1, calculation_or_name2, [name_value2, calculation_or_name3…])

Here, you have the following:

  • Name is the name of the variable that is being created
  • Name_value1 is the value that’s being assigned to the variable
  • Calculation_or_name2 is a calculation being done on the variable (or variables) or a name of the second variable
  • If there’s a second variable, you can add names and their definitions
  • The formula must end with a calculation.
How to Use Microsoft Excels LET Function to Simplify Complex Formulas 1

The formula can have up to 126 names defined.

Consider this simple example:

=LET(x,A1,y,B1,x+y)

In this example, we’re naming two variables that have the values of cells A1 and B2 respectively. Then, we’re adding them.

Excel LET Function Examples

With all this in mind, the formula becomes incredibly useful when you need to refer to a particular value by name or use it multiple times.

Example 1 – Replacing Repeated Calculations

Say you want to apply a 10% discount when an order total goes over 1,000. The array is located in B2:B10.

Without LET, the formula calculates the same sum three times:

=IF(SUM(B2:B10)>1000, SUM(B2:B10)*0.9, SUM(B2:B10))

How to Use Microsoft Excels LET Function to Simplify Complex Formulas 2

With LET, this becomes:

=LET(total, SUM(B2:B10), IF(total>1000, total*0.9, total))

How to Use Microsoft Excels LET Function to Simplify Complex Formulas 3

As you can see, the term “total” is used to remove three instances of summing.

Example 2 – Combine LET With FILTER

Filtering is relatively expensive in terms of calculations, so any formulas that require a filter can run slower if you have many of them.

Consider the following table of sales, where we want to find only sales of over 500 units and then list them in descending order.

How to Use Microsoft Excels LET Function to Simplify Complex Formulas 4

Let’s put the result starting in column E. Without LET, the formula is difficult to parse:

=SORT(FILTER(A2:C11, C2:C11>=500, “No results”), 3, -1)

You can’t really see what’s going on or what you need to search for.

With LET, you can make every argument of the calculation get a more “human-readable” name so you can change it later, for example in column I:

=LET(minSales, 500, matches, FILTER(A2:C20, C2:C20>=minSales, “No results”), SORT(matches, 3, -1))

In this simple example, you can easily tell what you need to change to get a different cutoff (the midSales field).

How to Use Microsoft Excels LET Function to Simplify Complex Formulas 5

Similarly, you can try to filter to get all the results from a single region, where you can even customize the range.

Without LET, this would look something like this:

=IF(ISBLANK(FILTER(A2:C11, B2:B11=”West”)), “-“, FILTER(A2:C11, B2:B11=”West”))

With LET, you can name the filtered region:

=LET(filterCriteria, “West”, filteredRange, FILTER(A2:C11, B2:B11=filterCriteria, “-“), filteredRange)

The final calculation returns all non-empty rows, which can be helpful if you’re trimming data.

You can see the results in cell E7 here:

How to Use Microsoft Excels LET Function to Simplify Complex Formulas 6

Example 3 – Modifying Output Based on Variables

Since LET allows you to create variables and do a calculation or output with them at the end, you can “nest” complex formulas as variables that are then concatenated for a final result.

Say column A lists full names like “Mia Torres” in cells A2 to A6, and you want them as “Torres, Mia.”

The formula for this would be:

=LET(fullName, A2:A6, space, FIND(” “, fullName), firstName, LEFT(fullName, space-1), lastName, MID(fullName, space+1, 100), lastName&”, “&firstName)

This formula finds the first and last names, then joins them together. As a bonus, since the concatenation is right at the end, you can modify the result easily by changing the string in the middle. For example, if you want to put a semicolon instead of a comma, all you have to do is change the part &”, “& to &”; “&.

Example 4 – Returning Multiple Outputs

A single LET formula can also spill several related results side by side. For example, column B holds units sold, column C the unit price, and column D a discount rate, in rows 2 to 6.

Then, consider the following formula:

=LET(subtotal, B2:B6*C2:C6, discount, subtotal*D2:D6, CHOOSE({1,2,3}, subtotal, discount, subtotal-discount))

Excel will output three columns with the subtotal, the discount amount, and the final total for each row.

Was this helpful?

Thanks for your feedback!

Last updated on 28 November, 2026

Leave a Reply

Your email address will not be published. Required fields are marked *

The article above may contain affiliate links which help support Guiding Tech. The content remains unbiased and authentic and will never affect our editorial integrity.