Cellwise Start free

Dynamic arrays function

Excel CHOOSECOLS function

CHOOSECOLS returns the columns you ask for from a range or array, in the order you list them. It is the easy way to keep only a few columns from a FILTER result, or to reorder a table without copying it.

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

Arguments

array
The range or array to take columns from.
col_num1
The first column to return, counted from the left of array. A negative number counts from the right: -1 is the last column.
col_num2
Optional. More columns, in the order you want them.

CHOOSECOLS examples

Every result below was calculated from this sample sheet by the same spreadsheet engine the Cellwise app uses.

ABCDE
1IDNameDeptEmailOffice
2E-101Maya OrtizFinance[email protected]Denver
3E-102Sam LeeSales[email protected]Austin
4E-103Ruth KahnSales[email protected]Denver
5E-104Joel ParkIT[email protected]Remote
6E-105Nia BrooksSales[email protected]Austin
  1. =CHOOSECOLS(A2:E6,2,4)

    Result: spills 5 rows × 2 columns

    Returns just the names and emails, side by side.

  2. =CHOOSECOLS(A1:E6,4,2)

    Result: spills 6 rows × 2 columns

    Columns come back in the order you list them, so the email column is now first, headers included.

  3. =CHOOSECOLS(FILTER(A2:E6,C2:C6="Sales"),2,-1)

    Result: spills 3 rows × 2 columns

    Sam LeeAustin
    Ruth KahnDenver
    Nia BrooksAustin

    Filter to Sales, then keep the name and the last column, the office.

  4. =CHOOSECOLS(A2:E6,XMATCH("Email",A1:E1))

    Result: spills 5 rows × 1 column

    Picks the column by its header, so the formula still works if someone moves the Email column.

How to use CHOOSECOLS

  1. Click the top-left cell of an empty area.
  2. Type =CHOOSECOLS( and select the data.
  3. Add the column numbers you want, separated by commas, counting from the first column of your selection.
  4. Close the bracket and press Enter.

Common CHOOSECOLS mistakes

Counting sheet columns

Numbers count from the left edge of array, not from column A. In CHOOSECOLS(C2:E6,1), 1 is column C.

A column number out of range

0, or a number larger than the number of columns, returns #VALUE!. Five columns allow 1 to 5 and -1 to -5.

Hard-coded numbers that drift

If columns get inserted, 4 may no longer be Email. Look it up with XMATCH("Email",A1:E1) instead.

Using it in older Excel

CHOOSECOLS needs Microsoft 365, Excel 2024 or Excel for the web. Older versions show #NAME?.

CHOOSECOLS FAQ

How do I return only certain columns from FILTER?

Wrap FILTER in CHOOSECOLS: =CHOOSECOLS(FILTER(A2:E6,C2:C6="Sales"),2,4) returns the names and emails of the Sales rows.

How do I reorder columns with a formula?

List the columns in the new order: =CHOOSECOLS(A1:E6,2,1,4) puts Name first, then ID, then Email.

What is the difference between CHOOSECOLS and INDEX?

INDEX(A2:E6,0,2) returns one whole column. CHOOSECOLS returns any number of columns in one step, in any order.

Related functions

Updated