Excel LAMBDA Lesson 1: Your First Custom Function

Excel LAMBDA Lesson 1: Your First Custom Function 1

📎 This article includes 1 downloadable practice file ↓

⏱ 2 min read

📘 Excel LAMBDA Library Course · Lesson 1 of 8

Advertisement
In this article
  1. The shape of a LAMBDA
  2. Save it with a name
  3. LET or LAMBDA?
  4. Common mistakes
  5. Practice

Every office has formulas that get typed again and again: add GST, convert to lakhs, work out the financial year. LAMBDA turns each of them into a function with a name, so a colleague can write =GSTINCL(B2) instead of copying a formula they don’t understand.

The shape of a LAMBDA

=LAMBDA(parameter1, parameter2, ..., calculation)

On its own in a cell it gives #CALC!, because it is a function waiting for inputs. Give it inputs in brackets straight after to test it:

=LAMBDA(x, x*2)(21)          → 42
=LAMBDA(l, w, l*w)(7, 4)      → 28

Save it with a name

  1. Formulas > Name Manager > New.
  2. Name: DOUBLE. Refers to: =LAMBDA(x, x*2) (no test brackets).
  3. Now anywhere in the workbook: =DOUBLE(A2).

Add a comment in the Name Manager’s Comment box; it appears as a tooltip when anyone types the function.

LET or LAMBDA?

LET LAMBDA
Names parts inside one formula Creates a reusable function for the whole workbook
Values come from the sheet Values are passed in as arguments
Use for one long formula Use for logic you repeat

They work well together: a LAMBDA often contains a LET.

💡 Always build and test the inline version first. When it gives the right answer on three different inputs, paste it into Name Manager without the test brackets.

Common mistakes

  • Leaving the test brackets in Name Manager: the name then holds a fixed value, not a function.
  • Parameter names like A1 or GST18: they look like cells. Use amt, rate, d.
  • Older Excel: LAMBDA needs Microsoft 365 or Excel 2024. Anyone on Excel 2019 sees #NAME?.

Practice

Download the workbook below. The tasks call each function inline, like =LAMBDA(x,x*2)(A2), so the file works on any Microsoft 365 PC; in your own files, save them by name in Name Manager. The Check column turns green when you’re right.

📎 Practice files for this article

  • 📗
    Lesson 1 practice workbook6 tasks: inline LAMBDA calls with checks.
    ⬇ XLSX · 14 KB

Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.

Advertisement
✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong

Leave a Reply

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