Exceljet

Quick, clean, and to the point

Lifting

Example of "lifting", an array calculation behavior in Excel

The term "lifting" refers to an array calculation behavior in Excel formulas. When you give an array to a function not programmed to accept arrays natively, Excel will "lift" the function and call it multiple times, one time for each value in the array. The result an array with the same dimensions as the input array. Lifting is a built-in behavior that happens automatically.

Example

The example shown illustrates what happens if you call the LEN function on the range C5:C7, which contains three values. LEN isn't programmed to handle arrays natively, so LEN is run three times, once for each value in an operation like this:

=LEN(C5:C7)
=LEN({"dog";"kitten";"fish"})
={3;6;4}

Notice the result is a vertical array with three values, just like the source range.

Dealing with multiple results

When lifting occurs in a formula, there will be multiple results, and these need to be catered for.

In the example above, because LEN returns three separate values in an array, we need handle the output with a function that can work with arrays. One option is to calculate a total character count in the range C5:C7 using SUMPRODUCT:

=SUMPRODUCT(LEN(C5:C7))

SUMPRODUCT will handle arrays natively, so this formula does not require control + shift + enter.

The SUM function could be used as well, but would need to be entered with CSE:

{=SUM(LEN(C5:C7))}

For more information on Excel's "array calculation behaviors", see this presentation by Joe McDaid on array formulas.

Note: A special case of lifting is called "pairwise lifting", which is combining arrays in a pairwise fashion.