The Excel CHOOSECOLS function allows you to extract columns from a range or array.
CHOOSECOLS Function Syntax
=CHOOSECOLS(array, col_num1, [col_num2], ...)
array : The array containing the rows to be returned.
col_num1 : The first row number to be returned
[col_num2] : [Optional] Additional row numbers to be returned.
Note: The CHOOSECOLS function is part of the new Excel Dynamic Arrays family. At the time of writing, Dynamic Arrays are only available in Microsoft 365. Excel 2021 and earlier Excel versions will not get CHOOSECOLS.
Watch the Video
Download the Example Workbook
Enter your email address below to download the sample workbook.
Excel CHOOSECOLS Function Examples
Let’s say I want to get the data from the first column of post codes and suburbs. I can do this easily with CHOOSECOLS:
Zeros are returned for empty cells.
We can rearrange the column order by specifying them in the col_num arguments like so:
We can also refer to the columns from the right by using negative values e.g. the last column can be found with -1 for the col_num. The second last column would be -2 and so on:
Tip: you can also specify the column numbers in an array e.g.:
Or with a nested function:
Related Excel Array Shaping Functions
|EXPAND Function||Expands or pads an array to a specified number of rows and columns.|
|TOROW Function||Returns the array in a single row. Useful for combining data across multiple columns and rows into a single row.|
|TOCOL Function||Returns the array in a single column. Useful for combining data across multiple columns and rows into a single column.|
|WRAPROWS Function||Lets you wrap (reshape) a row or column of values into rows, you specify the number of values in each row.|
|WRAPCOLS Function||Lets you wrap (reshape) a row or column of values into columns, you specify the number of values in each column.|
|DROP Function||Remove a specified number of contiguous rows or columns from the start or end of an array.|
|TAKE Function||Extract a specified number of contiguous rows or columns from the start or end of an array.|
|CHOOSEROWS Function||Extract rows from the specified column or columns.|
|VSTACK and HSTACK Functions||Combine arrays arranged vertically (VSTACK) or horizontally (HSTACK) into a new single array.|