LAMBDA turns a formula into a function. You list parameter names, then the formula that uses them: LAMBDA(price, cost, (price-cost)/price). On its own it has nothing to work on, so a cell holding just that shows #N/A. Give it values in brackets right after it: =LAMBDA(price, cost, (price-cost)/price)(D2, C2).
That's handy for testing, but the real use is named functions. Open Data > Named functions, press Add new function, and fill in:
- Function name, such as MARGIN. It can't be the name of a built-in function or look like a cell address.
- Argument placeholders, such as price and cost, in the order you'll pass values.
- Formula definition, starting with =, using the placeholders:
=(price-cost)/price.
Press Next, then Create. Now =MARGIN(D2, C2) works in every cell, and fixing the definition fixes every cell that uses it. Values go in by position: the first value fills the first placeholder.