Description
Returns the specified columns from an array.
NOTE
- The absolute value of the col_num should be greater than 0 and not exceed the number of columns in the array.
- The returned array has the same height as the original array.
Syntax
Copied!=CHOOSECOLS(array, col_num1, [col_num2], ...)
EXAMPLE
Copied!=CHOOSECOLS(A1:E10, 1, 3, 5, 1) //𝘵𝘢𝘬𝘦 𝘰𝘶𝘵 𝘵𝘩𝘦 𝘧𝘪𝘳𝘴𝘵 𝘢𝘯𝘥 𝘭𝘢𝘴𝘵 𝘤𝘰𝘭𝘶𝘮𝘯 =CHOOSECOLS(A1:E10, 1, -1) //𝘵𝘢𝘬𝘦 𝘰𝘶𝘵 𝘵𝘩𝘦 𝘧𝘪𝘳𝘴𝘵 𝘵𝘩𝘳𝘦𝘦 𝘤𝘰𝘭𝘶𝘮𝘯𝘴 =CHOOSECOLS(A1:E10, SEQUENCE(3)) //𝘳𝘦𝘷𝘦𝘳𝘴𝘦 𝘵𝘩𝘦 𝘰𝘳𝘥𝘦𝘳 𝘰𝘧 𝘤𝘰𝘭𝘶𝘮𝘯𝘴 =LET(a, A1:E10, c, COLUMNS(a), CHOOSECOLS(a, SEQUENCE(c, , c, -1)))