Loading…
Loading…
LAMBDA lets you build your own function with Excel formulas, no VBA. LAMBDA(price, price*1.2) takes one input called price and returns it with 20% tax. You can test it straight away by calling it: =LAMBDA(price, price*1.2)(B2). To reuse it, give it a name: Formulas → Define Name (here: the Name button, or Ctrl+F3), Name AddTax, Refers to =LAMBDA(price, price*1.2). Then =AddTax(B2) works in any cell like a built-in function. LAMBDA needs Microsoft 365 or Excel 2024.
Syntax
=LAMBDA(parameter1, [parameter2, …], calculation) · named: =AddTax(B2)
Example: Define Margin as =LAMBDA(price, cost, (price-cost)/price) and use =Margin(B2, C2). Fix the logic once in Define Name and every cell that uses it updates.
Common mistakes
Read the lesson, then try it yourself in a live spreadsheet.