Lookup & reference function

CHOOSECOLS function

Returns only the columns you ask for from a range or array, in the order you list them.

Available in Microsoft 365, Excel 2024, Excel for the web, Excel for Mac 2024+

Excel 2024 and laterWorks in Google Sheets

Syntax

CHOOSECOLS(array, col_num1, [col_num2], ...)
ArgumentWhat it means
arrayRequiredThe range or array to take columns from.
col_num1RequiredThe position of the first column to return, counted inside array. Negative numbers count from the right (-1 is the last column).
col_num2, ...OptionalMore column positions. They can repeat or be in any order.

Returns: An array containing only the chosen columns, which spills.

How CHOOSECOLS works

CHOOSECOLS picks columns out of a table. If a staff list has ID, Name, Department, Start year and Salary, CHOOSECOLS(A2:E5, 2, 5) gives you just the names and salaries. You decide the order too, so it can rearrange columns for a report without copying and pasting.

Column numbers are positions inside the range, not sheet letters, and negative numbers count from the right, which is convenient when tables grow wider. CHOOSECOLS really shines on top of other dynamic-array formulas: FILTER returns whole rows and CHOOSECOLS trims them to the columns you want to show. Its partner CHOOSEROWS does the same for rows.

Examples

1Keep two columns

G2fx=CHOOSECOLS(A2:E5, 2, 5)
ABCDEFGH
1IDNameDeptStart yearSalary
2201Maria LopezSales201952000Maria Lopez52000
3202Tom BeckerFinance202158500Tom Becker58500
4203Aisha KhanIT201864000Aisha Khan64000
5204Luca RossiSales202347500Luca Rossi47500

Column 2 (Name) and column 5 (Salary) of the range are returned for every row.

2Reorder columns

G2fx=CHOOSECOLS(A2:E5, 3, 2)
ABCDEFGH
1IDNameDeptStart yearSalary
2201Maria LopezSales201952000SalesMaria Lopez
3202Tom BeckerFinance202158500FinanceTom Becker
4203Aisha KhanIT201864000ITAisha Khan
5204Luca RossiSales202347500SalesLuca Rossi

Listing 3 before 2 puts the department in front of the name.

3Filter, then trim the columns

G2fx=CHOOSECOLS(FILTER(A2:E5, C2:C5="Sales"), 2, -1)
ABCDEFGH
1IDNameDeptStart yearSalary
2201Maria LopezSales201952000Maria Lopez52000
3202Tom BeckerFinance202158500Luca Rossi47500
4203Aisha KhanIT201864000
5204Luca RossiSales202347500

FILTER keeps the two Sales rows; CHOOSECOLS then returns the name and the last column (Salary).

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 17 KB

Common errors and how to fix them

ErrorWhy it happensFix
#VALUE!A column number is 0 or larger than the number of columns in array.Use positions from 1 to the width of the array, or negative numbers from -1.
#SPILL!The result has no room to spill.Clear the output area.

Tips

  • Use XMATCH to pick columns by header name: =CHOOSECOLS(A2:E5, XMATCH({"Name","Salary"}, A1:E1)).
  • Repeating a number repeats the column, which is occasionally handy for building labels.

Google Sheets

CHOOSECOLS also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

CHOOSECOLS in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
CzechZVOLITSLOUPCE
DanishVÆLGKOL
DutchKIES.KOLOMMEN
FinnishVALITSESARAKKEET
FrenchCHOISIRCOLS
GermanSPALTENWAHL
HungarianOSZLOPVÁLASZTÁS
ItalianSCEGLI.COL
Norwegian (Bokmål)VELGKOL
PolishWYBIERZ.KOLUMNY
Portuguese (Brazil)ESCOLHERCOLS
RussianВЫБОРСТОЛБЦ
SpanishELEGIRCOLS
SwedishVÄLJKOL
TurkishSÜTUNSEÇ