Skip to content
ExcelExcel 2021+

LET function in Excel

Assigns names to calculation results

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

LET syntax and parameters

Five arguments, three required.

  • name1stringRequired

    The first name to assign. Must start with a letter. Cannot be the output of a formula or conflict with range syntax.

  • name_value1anyRequired

    The value that is assigned to name1.

  • calculation_or_name2anyRequired

    One of the following:A calculation that uses all names within the LET function. This must be the last argument in the LET function.A second name to assign to a second name_value. If a name is specified, name_value2 and calculation_or_name3 become required.

  • name_value2anyOptional

    The value that is assigned to calculation_or_name2.

  • calculation_or_name3anyRepeating

    One of the following:A calculation that uses all names within the LET function. The last argument in the LET function must be a calculation.A third name to assign to a third name_value. If a name is specified, name_value3 and calculation_or_name4 become required.

LET examples

Formulas you'll actually reuse.

  1. Name the tax rate once instead of repeating it four times:

    =LET(tax, 0.19,
      net, B2,
      gross, net * (1 + tax),
      TEXT(gross, "$#,##0.00") & " incl. VAT"
    )

    Result"$118.99 incl. VAT"

  2. Reuse an expensive calculation — outliers above 2σ, computed once:

    =LET(range, B2:B13,
      avg, AVERAGE(range),
      sd, STDEV(range),
      COUNTIF(range, ">" & (avg + 2 * sd))
    )

    Result2

LET in Google Sheets

Same name — your formula ports as-is.

Try LET in the playground

Edit the example — nothing to install.

Preloaded with the LET formula from Example 1 — change anything and watch it respond.

Loading the editor…

LET errors

What they mean — and the fixes.

  • #NAME?

    A value expression references a name defined after it — LET only sees names declared earlier in the argument list.