Function · Shape arrays

Excel CHOOSECOLS function

The Excel CHOOSECOLS function returns the columns you number. Columns 1 and 3 of city, state, and ZIP are the city and the ZIP, without the state.

Microsoft 365 and Excel 2024, including Excel for the web. Also in Google Sheets. Excel 2021 does not have it.

Syntax =CHOOSECOLS(array, col_num1, [col_num2], ...)

CHOOSECOLS
=CHOOSECOLS(A1:C2,1,3)

Arguments

NameRequiredWhat to pass
arrayRequiredThe source. Column 1 is the first column of this array.
col_num1RequiredThe first column to return. A negative number counts from the right.
col_num2OptionalMore columns, in the order you want them spilled.

Examples

City and ZIP, skipping the state

=CHOOSECOLS(A1:C2,1,3)

Result Austin 78701 and Dallas 75201

=CHOOSECOLS(A1:C2,1,3)E1
Addresses
ABCDEF
1AustinTX78701Austin78701
2DallasTX75201Dallas75201
A picture of the sheet, not a live calculator. Column 2, the state, is not in the spill.

CHOOSECOLS keeps the columns you number and drops the rest. From city, state, and ZIP, columns 1 and 3 are Austin with 78701, and Dallas with 75201. The state column is column 2 and it is not in the spill. The result is still two rows because both source rows are kept.

Column 1 means the first column of the array, which is column A only when the array starts in column A. WRAPROWS of Austin, Dallas, Houston, San Antonio, Fort Worth, El Paso, Plano, and Arlington, three to a row, has Austin, San Antonio, and Plano in column 1. CHOOSECOLS of that spill, column 1, returns those three names. A negative index counts from the right, so -1 is the ZIP. INDEX can return one column in older Excel. CHOOSECOLS can return several, in any order. Excel 2021 does not have it.