ZIP
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. Specifically, given n arrays of at least 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.
Syntax
=ZIP(array1, array2, ...., arrayN)
Arguments
Argument | Type | Description |
---|---|---|
array | Array | Array of items to combine |
Examples
=ZIP([1, 2, 3], ["a", "b", "c"])
→[[1, "a"], [2, "b"], [3, "c"]]
=ZIP([1, 2, 3, 4], ["a", "b"])
→[[1, "a"], [2, "b"]]
=ZIP([1, 2, 3, 4], ["a", "b"], ["Z", "Y", "Z"])
→[[1, "a", "Z"], [2, "b", "Y"]]
Updated 10 months ago