CHOOSECOLS

The CHOOSECOLS function returns specific columns from an array.

CHOOSECOLS(array, column-index, column-index…)

array: The array containing the columns to be returned.

column-index: The column numbers to be returned.

column-index…: Optionally include additional columns to be returned.

Notes

  • A negative value for column-index takes from the end of the array.

  • You can use the spilled range operator “#” to reference an array created by a formula.

Examples

=CHOOSECOLS(A1:E5, 1,4) returns columns A and D, the first and fourth columns in the array.

=CHOOSECOLS(A1:E5, 2,3) returns columns B and C, the second and third columns in the array.

=CHOOSECOLS(A1:E5, 1, -1) returns columns A and E, the first column and last column from the array.

See alsoCHOOSEROWS
Morty Proxy This is a proxified and sanitized view of the page, visit original site.
Helpful?
Character limit: 250
Maximum character limit is 250.
Thanks for your feedback.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.