Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

Excel SEQUENCE, LET, and LAMBDA: Practical Formula Examples

Generate number and date lists, simplify repeated calculations, and create reusable Excel functions with worked examples.

Table of Contents

Use SEQUENCE to generate a series, LET to name parts of a formula, and LAMBDA to turn a calculation into a reusable function. They solve different problems and can also work together.

Check function availability in your Excel edition before sharing a workbook. Older versions may not support all three. Examples below use English function names and commas; your locale may use different names or separators.

1. SEQUENCE: generate numbers and dates

3 Excel Functions That Will Make You a Spreadsheet Expert Picture 1

=SEQUENCE(rows, [columns], [start], [step])

Rows sets the vertical size. Columns sets the horizontal size; start is the first number and step is the increment. The optional arguments default to 1 when omitted.

=SEQUENCE(32)
=SEQUENCE(32,1,1001)

The first formula produces 1 through 32 in one column. The second produces 1001 through 1032. Leave the output area empty so the dynamic array can spill into adjacent cells.

Excel stores dates as numbers, so you can generate consecutive dates too:

=SEQUENCE(12,1,DATE(2025,1,1),1)

Format the result as dates. This example produces January 1–12, 2025, not the first day of twelve different months. It includes weekends; a working-day schedule needs separate weekend and holiday rules.

Do not treat a changing formula sequence as a permanent invoice-number system. Reordering data or changing the formula can change the displayed identifiers.

2. LET: make repeated logic easier to inspect

3 Excel Functions That Will Make You a Spreadsheet Expert Picture 2

=LET(name1,value1,[name2,value2,...],calculation)

LET defines names inside the formula, then uses them in its final calculation. Consider a hypothetical 5% commission with a 10% uplift when the calculated commission exceeds 500:

=IF(G2*0.05>500,G2*0.05*1.1,G2*0.05)

The expression G2*0.05 appears three times. Define it once instead:

=LET(commission,G2*0.05,IF(commission>500,commission*1.1,commission))

If G2 is 12,000, commission is 600 and the final result is 660. At exactly 500, the uplift does not apply because the condition uses >, not >=.

You can also give a margin formula meaningful names and handle zero revenue explicitly:

=LET(revenue,G2,costs,L2,IF(revenue=0,"Check revenue",LET(margin,(revenue-costs)/revenue,IF(margin>0.3,"High",IF(margin>0.15,"Medium","Low")))))

These labels and thresholds are examples, not accounting standards. Decide how your workbook should handle missing, negative, or nonnumeric inputs.

3. LAMBDA: define a reusable calculation

3 Excel Functions That Will Make You a Spreadsheet Expert Picture 3 3 Excel Functions That Will Make You a Spreadsheet Expert Picture 4 3 Excel Functions That Will Make You a Spreadsheet Expert Picture 5

A LAMBDA accepts parameters and returns a result. First test it in a cell by calling it immediately:

=LAMBDA(sales,quota,weight,IF(quota=0,NA(),(sales/quota)*weight))(120,100,0.7)

The result is 0.84. The zero-quota check deliberately returns #N/A rather than a misleading performance score. A bare LAMBDA entered without a call can return #CALC!.

To reuse the calculation in Windows desktop Excel:

  1. Open Formulas > Name Manager > New.
  2. Enter PerformanceScore as the name and choose Workbook scope.
  3. In Refers to, enter the function definition without the test call:
=LAMBDA(sales,quota,weight,IF(quota=0,NA(),(sales/quota)*weight))

Save the name, then call it from a cell:

=PerformanceScore(B2,C2,0.7)

Document the input units and weighting scale. The function is available in that workbook; it does not automatically become a function in every file you open. For more examples, see using LAMBDA in Excel.

A revenue classification function could use:

=LAMBDA(revenue,IF(revenue>100000,"High",IF(revenue>50000,"Medium","Low")))

Under these rules, exactly 100,000 is Medium and exactly 50,000 is Low. Test boundary values before adopting any classification.

Combine them for a scenario model

3 Excel Functions That Will Make You a Spreadsheet Expert Picture 6

=LET(base_sale,G2,growth_rate,L2,ProjectMonthly,LAMBDA(month,base_sale*(1+growth_rate)^month),ProjectMonthly(SEQUENCE(12)))

G2 contains the starting sales amount and L2 the assumed monthly growth rate, such as 4%. SEQUENCE supplies months 1–12; the local LAMBDA calculates each projected value. Month 1 includes one growth period, so the starting amount itself is not the first output. This is an assumption-based scenario, not evidence that sales will follow that path.

A second hypothetical example combines a reusable function and named intermediate value:

=LAMBDA(sales,target,IF(target=0,NA(),LET(ratio,sales/target,IF(ratio>=1.2,sales*0.08,IF(ratio>=1,sales*0.05,0)))))

Save it under a suitable name before using it. It pays 8% of sales at 120% of target or higher, 5% at 100% or higher, and zero below target. Verify that these example rules match your intended policy. Review IF conditions if a threshold behaves unexpectedly.

Reference: Microsoft's LAMBDA documentation.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.