Array

CHOOSECOLS Formula

Returns specific columns from an array or range by column number. CHOOSECOLS lets you cherry-pick and reorder columns without complex INDEX formulas, making it easy to extract just the columns you need from a wide dataset or rearrange column order for a report.

Syntax

CHOOSECOLS(array, col_num1, [col_num2, ...])
ParameterDescription
array Parameter of the CHOOSECOLS function.
col_num1 Parameter of the CHOOSECOLS function.
[col_num2 (Optional.) Parameter of the CHOOSECOLS function.
...] Parameter of the CHOOSECOLS function.
Try CHOOSECOLS in Viztab — free, no signup

Examples

Pick columns 1 and 4 from a table

Formula
=CHOOSECOLS(A1:F100, 1, 4)
Returns a 2-column result containing just the 1st and 4th columns from the 6-column source. Perfect for extracting name and phone from a contacts table.

Reorder columns

Formula
=CHOOSECOLS(A1:D50, 3, 1, 4, 2)
Returns all 4 columns but rearranged in the order: 3rd, 1st, 4th, 2nd. Great for reformatting exports to match a required import order.

Last column shortcut

Formula
=CHOOSECOLS(A1:F100, -1)
Returns just the last column. Negative numbers count from the right, so -1 is the rightmost column.

Common Errors

#VALUE!

A column number is zero or exceeds the number of columns in the array (in either positive or negative direction).

#SPILL!

Output cells are not empty.

Tips

Negative column numbers

Use -1 for the last column, -2 for second-to-last, etc. This makes formulas resilient to arrays that might change width.

Duplicate columns allowed

You can repeat a column number: CHOOSECOLS(data, 1, 1, 2) returns column 1 twice followed by column 2. Useful for creating specific layouts.

Combine with FILTER

=CHOOSECOLS(FILTER(A1:F100, C1:C100>50000), 1, 3, 5) filters rows first, then picks only the columns you want. A two-step data extraction.

Try CHOOSECOLS in Viztab

Import your data and use CHOOSECOLS with 370+ other formulas. No signup required.

Open Viztab

Related Formulas