MAP is also useful when the formula logic is complex and would be best managed in a single location.

Using a named LAMBDA function with MAP is possible to reuse the same code elsewhere.

Note that the second argument must be an array if not a lambda.

Excel formula: Get location of value in 2D array

Examples

The MAP function maps each value in an array to a custom LAMBDA function.

Without the +, MAP will return a #CALC!

This step is sometimes necessary when working with array formulas that spill.

Excel formula: Tiered discounts based on quantity

Additional arrays

MAP can accept additional arrays that can be used by the LAMBDA during calculation.

Note: The MAP function returns an array of results.

See theREDUCE functionif you want to process each item in an array individually but you want asingleaggregated result.

Excel formula: MAP with AND and OR logic

LET Function

The Excel LET function lets you define named variables in a formula.

BYCOL can apply stock functions like SUM, COUNT, and AVERAGE or a custom LAMBDA function.

BYROW can apply stock functions like SUM, COUNT, and AVERAGE or a custom LAMBDA function.

Excel LAMBDA function

All results are returned at the same time in a single array….

Excel LET function

Excel MAP function

Excel SCAN function

Excel REDUCE function

Excel MAKEARRAY function

Excel BYCOL function

Excel BYROW function