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], ...)| Argument | What it means | |
|---|---|---|
array | Required | The range or array to take columns from. |
col_num1 | Required | The position of the first column to return, counted inside array. Negative numbers count from the right (-1 is the last column). |
col_num2, ... | Optional | More 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
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | ID | Name | Dept | Start year | Salary | |||
| 2 | 201 | Maria Lopez | Sales | 2019 | 52000 | Maria Lopez | 52000 | |
| 3 | 202 | Tom Becker | Finance | 2021 | 58500 | Tom Becker | 58500 | |
| 4 | 203 | Aisha Khan | IT | 2018 | 64000 | Aisha Khan | 64000 | |
| 5 | 204 | Luca Rossi | Sales | 2023 | 47500 | Luca Rossi | 47500 |
Column 2 (Name) and column 5 (Salary) of the range are returned for every row.
2Reorder columns
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | ID | Name | Dept | Start year | Salary | |||
| 2 | 201 | Maria Lopez | Sales | 2019 | 52000 | Sales | Maria Lopez | |
| 3 | 202 | Tom Becker | Finance | 2021 | 58500 | Finance | Tom Becker | |
| 4 | 203 | Aisha Khan | IT | 2018 | 64000 | IT | Aisha Khan | |
| 5 | 204 | Luca Rossi | Sales | 2023 | 47500 | Sales | Luca Rossi |
Listing 3 before 2 puts the department in front of the name.
3Filter, then trim the columns
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | ID | Name | Dept | Start year | Salary | |||
| 2 | 201 | Maria Lopez | Sales | 2019 | 52000 | Maria Lopez | 52000 | |
| 3 | 202 | Tom Becker | Finance | 2021 | 58500 | Luca Rossi | 47500 | |
| 4 | 203 | Aisha Khan | IT | 2018 | 64000 | |||
| 5 | 204 | Luca Rossi | Sales | 2023 | 47500 |
FILTER keeps the two Sales rows; CHOOSECOLS then returns the name and the last column (Salary).
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#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
XMATCHto 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.
| Language | Function name |
|---|---|
| Czech | ZVOLITSLOUPCE |
| Danish | VÆLGKOL |
| Dutch | KIES.KOLOMMEN |
| Finnish | VALITSESARAKKEET |
| French | CHOISIRCOLS |
| German | SPALTENWAHL |
| Hungarian | OSZLOPVÁLASZTÁS |
| Italian | SCEGLI.COL |
| Norwegian (Bokmål) | VELGKOL |
| Polish | WYBIERZ.KOLUMNY |
| Portuguese (Brazil) | ESCOLHERCOLS |
| Russian | ВЫБОРСТОЛБЦ |
| Spanish | ELEGIRCOLS |
| Swedish | VÄLJKOL |
| Turkish | SÜTUNSEÇ |