This function creates a new array from the selected columns in the existing range.

Sample Usage

CHOOSECOLS(A1:E5, 1, 3, 1)

CHOOSECOLS(A1:E5, -1, -2, -3)

Syntax

CHOOSECOLS(array, col_num1, [col_num2])

  • array: The array that contains the columns to be returned.
  • col_num1: The column number of the first column to be returned.
  • col_num2…: [ OPTIONAL ] The column number(s) of additional column(s) to be returned.

Examples

Simple data extraction operation with CHOOSECOLS

Example data:

1StudentMathHistoryScienceGym
2Harry95708278
3Jenny859110080
4Lily76888095
5Sunny60778980

Example: Input this formula in G1: =CHOOSECOLS(A1:E5, 1, 3, 2)

Result:

GHI
1StudentHistoryMath
2Harry7095
3Jenny9185
4Lily8876
5Sunny7760

Make a Copy

Simple data extraction with CHOOSECOLS selecting columns from the right side

Example data:

1StudentMathHistoryScienceGym
2Harry95708278
3Jenny859110080
4Lily76888095
5Sunny60778980

Example: Input this formula in G1: =CHOOSECOLS(A1:E5, 1, -1, -2)

Result:

GHI
1StudentGymScience
2Harry7882
3Jenny80100
4Lily9580
5Sunny8089

Make a Copy