Forum Discussion
Choosecols function in Office 2024 PRO
1.CHOOSECOLS function basic usage
excel
=CHOOSECOLS(data area, column number 1, column number 2... to be returned)
Example: extract A: C region of the first and third columns
=CHOOSECOLS(A:C, 1, 3)
2. High-frequency problem solution
Function invalid error
Checking steps:
File → Account → About Excel to check the version number.
Below this version need to be upgraded through the Office update channel
3. Return results abnormal
Dynamic array overflow issue:
Add @ in front of the formula to force the return of a single value:
=@CHOOSECOLS(A:C, 2)
Column number out of range:
Dynamic control with COLUMNS function:
=CHOOSECOLS(A:C, 1, COLUMNS(A:C))
4. and FILTER and other function combinations
Extract the specified columns to meet the conditions:
excel
=CHOOSECOLS(
FILTER(A:D, B:B>100),
1, 3
)
5. Efficiency optimisation techniques
Instead of INDEX+MATCH:
excel
// Old method
=INDEX(A:C, MATCH(‘Conditional’,A:A,0), 3)
// New method
=CHOOSECOLS(FILTER(A:C, A:A=‘condition’), 3)