==CHOOSECOLS(array, col_num1, [col_num2], ...)
=CHOOSECOLS(A1:C5,1,3)
For example, the above formula will return the first and third columns of an array.
=CHOOSECOLS(A1:C5,3,1)
The function can also be used to select columns in any order. For example, this will return the third and first columns of an array.
=CHOOSECOLS(A1:C5,4)
This example will return an error because it tries to return the fourth column of an array.
=CHOOSECOLS(B3:F9,{1,3,5})
The function can also accept an array constant to select multiple columns at once. This example, will return the first, third, and fifth columns of an array with the array constant {1,3,5}.
The CHOOSECOLS function is used to create a new array containing only the specified columns from an existing array.