MAP function

MAP is used as an auxiliary function, in combination with the LAMBDA function, it is dynamic in nature and returns all those data range values that meet the specified condition. It reminds a little of other functions for working with dynamic arrays, but instead of values, it returns those that were calculated within a given expression. The LAMBDA function is in charge of the calculation.

The syntax of this function is:

MAP (<range>,<range returned by function LAMBDA>)

A table is given in which we can see the amount of sales by cities. If the target value of sales is 80000 EUR, how can we show how much the sales have been exceeded? That is, if it is not exceeded, should the formula return the value 0? We should write the formula:

=MAP(B3:B7,LAMBDA(x,IF(x>80000,x,x/2)))

The formula is dynamic in nature, so we could reference a cell instead of a given value. Think about it, where could you put this into practice?