CHOOSECOLS function in Google Sheets
Creates a new array from the selected columns in the existing range.
=CHOOSECOLS(array, col_num1, [col_num2])CHOOSECOLS syntax and parameters
Three arguments, two required.
- arrayarrayRequired
The array that contains the columns to be returned.
- col_num1numberRequired
The column number of the first column to be returned.
- col_num2numberRepeating
[ OPTIONAL ] The column number(s) of additional column(s) to be returned.
CHOOSECOLS examples
Formulas you'll actually reuse.
Just Customer, Amount, and Status out of a six-column export:
=CHOOSECOLS(A2:F200, 1, 4, 6)The last column wherever it sits — negative indexes count from the right:
=CHOOSECOLS(A2:F200, -1)
CHOOSECOLS in Excel
Same name — your formula ports as-is.
Try CHOOSECOLS in the playground
Edit the example — nothing to install.
Preloaded with the CHOOSECOLS formula from Example 1 — change anything and watch it respond.
CHOOSECOLS errors
What they mean — and the fixes.
#VALUE!A column number is 0 or beyond the array's width — indexes are 1-based, and negative ones count back from the last column.
Related functions
More ways Google Sheets gets this done.
- CHOOSEROWSCreates a new array from the selected rows in the existing range.ArrayExcel
- HSTACKAppends ranges horizontally and in sequence to return a larger array.ArrayExcel
- LINESTGiven partial data about a linear trend, calculates various parameters about the ideal linear trend using the least-squares method.ArrayExcel
- MDETERMReturns the matrix determinant of a square matrix specified as an array or range.ArrayExcel
- MINVERSEReturns the multiplicative inverse of a square matrix specified as an array or range.ArrayExcel
- MMULTCalculates the matrix product of two matrices specified as arrays or ranges.ArrayExcel