ZIPALL

Combines the items in several input arrays by putting the first item from each array into the first output array, the second item from each array into the second output array, and so on, using the default value for any missing items. Specifically, given n arrays of as many as m values each, returns an array of m arrays of n values each, where the ith value in the jth output array is the jth value in the ith input array or a default value.

Syntax

=ZIPALL(array1, default1, array2, default2, ...., arrayN, defaultN)

Arguments

ArgumentTypeDescription
arrayArrayArray of items to combine
defaultAnyDefault value to use for any missing items

Examples

=ZIPALL([1, 2, 3], ["a", "b", "c"])[[1, "a"], [2, "b"], [3, "c"]]

=ZIPALL([1, 2, 3, 4], 0, ["a", "b"], "z")[[1, "a"], [2, "b"], [3, "z"], [4, "z"]]