Skip to content
ArumSoft Learning
KO

    Names and custom functions

    LAMBDA function playground

    Turns a formula into your own reusable function with named inputs.

    Available in: Excel 2024, Microsoft 365, Excel for the webRead the full tutorial →

    The playground runs in your browser. Nothing you type is sent anywhere.

    How LAMBDA works

    LAMBDA turns a calculation into a function. The parameters are placeholders for the inputs, and the last argument is the calculation that uses them.

    Typed on its own, =LAMBDA(x, x*2) returns #CALC! because nothing gives it an input. Call it straight away by adding the inputs in brackets, like =LAMBDA(x, x*2)(5), or name it inside LET.

    To reuse it anywhere in a workbook, save it in Formulas > Name Manager under a name such as ADDTAX, then type =ADDTAX(B2). LAMBDA also drives helper functions like MAP and BYROW, which run your calculation on every item or row.

    Syntax

    =LAMBDA([parameter1, parameter2, ...], calculation)
    ArgumentWhat it means
    parameter1, ...optionalNames for the inputs, such as price or qty. Up to 253. They can't look like cell addresses.
    calculationrequiredThe last argument: the formula that uses the parameters.

    Examples

    FormulaWhat it doesResult
    =LAMBDA(price,qty,price*qty)(B2,C2)Call a two-input LAMBDA straight away with B2 and C2.480
    =LET(withtax,LAMBDA(p,p*1.08),withtax(B2))Name a LAMBDA inside LET and call it like a function: price plus 8% tax.$259.20
    =MAP(B2:B7,C2:C7,LAMBDA(p,q,p*q))MAP runs the LAMBDA on each row and spills the line totals.$480.00 (spills 6×1)
    =BYROW(B2:C7,LAMBDA(r,INDEX(r,1)*INDEX(r,2)))BYROW hands each row to the LAMBDA as a small range.$480.00 (spills 6×1)
    =LAMBDA(x,x*2)Not called, so the result is #CALC!.#CALC!

    Common mistakes

    #CALC! on its ownA LAMBDA that isn't called has nothing to calculate. Add the inputs in brackets, use it in LET or MAP, or save it in Name Manager.
    Wrong number of inputsCall it with exactly as many inputs as it has parameters, or you get #VALUE!.
    VersionLAMBDA needs Microsoft 365, Excel 2024 or Excel for the web. Earlier versions show #NAME?.

    Learn more

    Download the example workbook (.xlsx)

    The workbook has the same sample data and formulas, plus a practice sheet.

    Read the full tutorial →