How to Choosecols Function in Excel

Learn multiple Excel methods to choosecols function with step-by-step examples and practical applications.

excelformulaspreadsheettutorial
11 min read • Last updated: 7/2/2025

How to Choosecols Function in Excel

Why This Task Matters in Excel

Selecting only the columns you need from a larger table is one of those deceptively simple tasks that has an outsized impact on productivity, reporting accuracy, and workbook performance. Finance analysts routinely download ERP extracts that arrive with 60 columns, when only six are relevant for the weekly cash-flow model. Marketing professionals receive lead data from a CRM system with dozens of columns, yet the dashboard needs only the five KPIs that drive the campaign’s return on investment. Operations staff export raw sensor logs containing timestamps, temperatures, pressures, and dozens of configuration fields, but management merely wants two or three key readings for compliance reporting.

Failing to strip away unnecessary columns slows every downstream activity: formulas must crunch more cells, PivotTables become cluttered, and charts show confusing blank series. Worse, redundant columns often carry personally identifiable information or confidential data that should never reach external stakeholders. Knowing how to “choose columns” programmatically—rather than manually hiding or deleting them—ensures repeatability, compliance, and a single source of truth.

Excel offers several ways to accomplish this task. The brand-new CHOOSECOLS function in Microsoft 365 is purpose-built and refreshes automatically when source data size changes. Legacy workbooks can fall back on INDEX with SEQUENCE, FILTER with a column list, or Power Query for a low-code, refreshable solution. Each approach integrates nicely with other Excel workflows such as dynamic arrays, spill ranges, and data validation. Mastering column selection is therefore a gateway skill that improves data cleaning, model clarity, and performance across virtually every Excel-based process.

Best Excel Approach

For users running Microsoft 365 or Excel for the web, the native CHOOSECOLS function is the fastest and most transparent way to pick specific columns from a data range or spill array. It is lightweight, requires no helper columns, and dynamically resizes when the source range grows or shrinks.

Syntax

=CHOOSECOLS(array, col_num1, [col_num2], …)
  • array – the entire dataset, typically a structured table or spill range
  • col_num1 – the index of the first column you want to keep (1 for the left-most column)
  • [col_num2] … – additional column positions to include; you can list as many as needed

Why choose CHOOSECOLS?

  1. Simplicity: One formula replaces multiple INDEX or FILTER calls.
  2. Dynamic spill: The output expands automatically when more rows are added to the source.
  3. Readability: Auditors instantly see which columns are included.

Use CHOOSECOLS when you:

  • Need a live, refreshable subset of a larger range
  • Plan to nest the result inside other dynamic array functions such as SORT or UNIQUE
  • Are working in modern Excel versions that support spill formulas

If you are on Excel 2019 or earlier, INDEX with SEQUENCE is the closest alternative:

=INDEX(Table1, , SEQUENCE(,3,{1,3,5}))

This performs essentially the same job but requires an extra layer of logic to build the column vector.

Parameters and Inputs

The CHOOSECOLS function accepts only two kinds of inputs, yet understanding their nuances avoids 90 percent of errors.

  1. array

    • Can be an ordinary range like [A1:Z1000], a structured Table name such as SalesData, or the result of another spill formula (for example, FILTER).
    • Must be contiguous; non-adjacent ranges are not allowed without combining them first, for instance with HSTACK.
    • Can be vertical or horizontal. If you feed a horizontal array into CHOOSECOLS, Excel still interprets “columns” as vertical positions.
  2. col_num arguments

    • Accept positive or negative integers. Positive numbers count from the left; negative numbers count back from the right (-1 picks the last column, ‑2 the second to last).
    • Must be integers. Decimal values throw a #VALUE! error.
    • Can repeat; duplicates simply repeat the column in the output.
    • Can be hard-coded (3), referenced from cells (B1), or produced by formulas such as XMATCH.

Data preparation

  • Remove completely blank rows above the header; spilled functions use the first non-blank cell as the starting point.
  • Convert raw ranges into Excel Tables to allow structured references, which survive row or column insertions.
  • For external data connections, refresh before recalculating CHOOSECOLS so that indexes align with the latest structure.

Edge cases

  • If any col_num is zero or exceeds the width of array, CHOOSECOLS returns #VALUE!.
  • Supplying no col_num arguments returns #VALUE! because at least one column must be chosen.
  • If array itself is empty, CHOOSECOLS spills a blank result rather than an error.

Step-by-Step Examples

Example 1: Basic Scenario

Imagine a simple sales report stored in [A1:F11] with headers: Date, Region, Rep, Product, Units, Revenue. Your regional manager only needs Date, Region, and Revenue for a quick summary.

  1. Select an empty cell, say H1.
  2. Enter the formula:
=CHOOSECOLS(A1:F11, 1, 2, 6)
  1. Press Enter. The result spills into H1:J11, showing exactly three columns.
  2. Format column J as currency if needed.

Why it works
CHOOSECOLS takes the six-column array and returns columns 1, 2, and 6. Because the input array is literal, the column positions remain stable even if you later insert a new column between Units and Revenue (it becomes column 7 and is therefore ignored).

Variations

  • Swap hard-coded positions for cell references. If L1 contains 1, L2 contains 2, and L3 contains 6, then write:
=CHOOSECOLS(A1:F11, L1, L2, L3)

Now the manager can re-order or replace column numbers without touching the formula.

Troubleshooting
If H1 shows #VALUE!, verify that Revenue is still the sixth column. Accidental column insertions shift positions; converting the range to a Table and using structured references prevents this.

Example 2: Real-World Application

A marketing analyst receives a monthly CSV export named Leads2023-05 containing 50 columns: ID, Timestamp, Source, FirstName, LastName, Email, Phone, City, State, Country, CampaignCode, CampaignCost, … up to UTM parameters and internal flags. The performance dashboard only requires ID, Source, State, CampaignCode, and CampaignCost.

Step by step

  1. Import the CSV using Data ➡ From Text/CSV, and load it to a Table called Leads.
  2. In a summary sheet, reserve cell B3 for the filtered subset.
  3. Enter:
=CHOOSECOLS(Leads, 1, 3, 9, 11, 12)
  1. Optionally chain SORT to order by CampaignCost descending:
=SORT(CHOOSECOLS(Leads, 1, 3, 9, 11, 12), ,5, -1)

Business impact
The dashboard now pulls only five columns from a dataset that might grow to hundreds of thousands of rows. File size stays manageable, Excel recalculates instantly, and sensitive columns like Email remain hidden.

Integration with other features

  • PivotTable: Point a PivotTable at the spilled range for aggregated spend by state.
  • Data validation: Create dropdowns based on UNIQUE from column State of the spill.
  • Conditional formatting: Highlight rows where CampaignCost exceeds a threshold, using the dynamic spill reference.

Performance considerations
Because CHOOSECOLS simply references existing memory, it imposes negligible overhead even on a 200,000-row table. Contrast this with copying and pasting, which duplicates data and bloats the workbook.

Example 3: Advanced Technique

Suppose you are building a financial model where the list of required columns is itself dynamic, driven by user selection in a slicer-like interface. Column names live in [F2:F5]. You need to return those exact columns, no matter their position in the raw data table DataTbl.

Approach

  1. Convert F2:F5 to a single spill array called SelectedCols via
=TEXTSPLIT(TEXTJOIN(",",,F2:F5),",")
  1. Translate column names to positions:
=XMATCH(SelectedCols, DataTbl[#Headers])

This spills a numeric vector such as [2,5,7,1].

  1. Feed that vector into CHOOSECOLS:
=CHOOSECOLS(DataTbl, XMATCH(SelectedCols, DataTbl[#Headers]))
  1. Wrap with LET for readability:
=LET(
 cols, XMATCH(SelectedCols, DataTbl[#Headers]),
 CHOOSECOLS(DataTbl, cols)
)

Edge case handling

  • If the user picks a header that does not exist, XMATCH returns #N/A. Use IFNA to replace missing columns with a placeholder:
cols, IFNA(XMATCH(SelectedCols, DataTbl[#Headers]), 0)
  • Because CHOOSECOLS cannot process zeros, wrap with FILTER:
=LET(
 c, IFNA(XMATCH(SelectedCols, DataTbl[#Headers]), 0),
 CHOOSECOLS(DataTbl, FILTER(c, c>0))
)

Professional tips

  • Name the LET variables descriptively (e.g., colIndex) for future audit clarity.
  • Combine with LAMBDA to create a reusable custom function CHOOSECOLSBYNAME that works workbook-wide.

Tips and Best Practices

  1. Always reference Tables rather than fixed ranges. When new columns are inserted, structured references maintain logical positions.
  2. Document column meanings in adjacent comments or via the Notes feature so colleagues understand the numeric arguments.
  3. Use negative indexes (-1, ‑2) for “last column” scenarios, such as always pulling the most recent month appended at the far right.
  4. Combine CHOOSECOLS with CHOOSEROWS, FILTER, and SORT to create sophisticated pipelines—all still spill-enabled.
  5. Avoid volatile functions like OFFSET inside CHOOSECOLS chains; they recalculate more often and can slow large models.
  6. Name spilled ranges using the Formula ➡ Define Name dialog to reference them easily in charts and PivotTables.

Common Mistakes to Avoid

  1. Mis-counting columns: Users often misnumber because they forget the header row is not part of the index. Double-check by selecting the header row and looking at column letters.
  2. Using hidden columns: Hiding a column does not change its index; CHOOSECOLS still counts it, leading to unexpected output. Delete or unhide irrelevant columns before applying the function.
  3. Zero or non-integer indexes: If any argument resolves to zero, decimal, or text, Excel returns #VALUE!. Wrap dynamic indexes in INT or validate with ISNUMBER.
  4. Feeding non-contiguous ranges: Because CHOOSECOLS requires a single array, passing [A:C,E:F] via the mouse returns an error. Use HSTACK first or redesign the layout.
  5. Version mismatch: Sending a workbook with CHOOSECOLS formulas to an Excel 2019 user leads to blocky #NAME? cells. Provide a backward-compatible INDEX version or export values.

Alternative Methods

MethodExcel VersionDynamic SpillComplexityProsCons
CHOOSECOLSMicrosoft 365YesVery LowSimple, readable, supports negative indexesNot available in older versions
INDEX + SEQUENCE2019 and later (but manual spill)PartialMediumBackward compatible, flexibleLonger formulas, harder to audit
FILTER with Selected Columns2019+YesMediumAllows row filtering and column selection simultaneouslyRequires array of Boolean logic for rows
Power Query2010+ with add-inN/A (loads to Table)Low (UI)Handles millions of rows, no formula maintenanceRequires refresh step, learning Power Query UI
VBA MacroAnyN/AHighUnlimited customization, works everywhereMacros disabled in many organizations, maintenance burden

When to use each

  • Stick with CHOOSECOLS if every stakeholder runs Microsoft 365.
  • Choose INDEX or FILTER for mixed environments where some users cannot run the latest functions.
  • Use Power Query when datasets exceed the 1,048,576-row grid limit or when you need additional transformations like unpivoting.
  • Employ VBA only for specialized workflows such as generating multiple output files automatically.

FAQ

When should I use this approach?

Use CHOOSECOLS whenever you need a live subset of columns from a larger dataset and you are working in Excel 365. It is ideal for dashboards, financial models, or any report that frequently refreshes from external data.

Can this work across multiple sheets?

Yes. Point the array argument to a range on another sheet, such as Sheet2![A1:Z1000]. Structured Table references work across sheets without additional syntax. Remember that spilling occurs on the current sheet, so ensure sufficient empty columns to the right.

What are the limitations?

CHOOSECOLS cannot select non-contiguous ranges in a single call, cannot transpose data, and is unavailable in versions prior to Microsoft 365. It also fails if any column index is outside the array bounds.

How do I handle errors?

Wrap the formula in IFERROR to display a friendly message. For dynamic index lists, validate indexes with FILTER or LET before passing them into CHOOSECOLS. Use the Evaluate Formula tool to step through complex LET chains.

Does this work in older Excel versions?

Workbooks containing CHOOSECOLS show #NAME? in Excel 2019 and earlier. Provide an alternative sheet with INDEX + SEQUENCE or deliver the output as static values. Power Query is another version-agnostic fallback.

What about performance with large datasets?

CHOOSECOLS adds negligible overhead because it passes references, not copies. The primary bottleneck remains the size of the source range. If you experience sluggishness with hundreds of thousands of rows, store the data in Power Query or an external database and bring only required columns into Excel.

Conclusion

Mastering CHOOSECOLS streamlines data preparation, reduces formula clutter, and safeguards sensitive information—an unbeatable trio for any Excel user. Whether you are building quick ad-hoc reports or enterprise-scale dashboards, the ability to programmatically pick only the columns you need keeps models lean, auditable, and refresh-friendly. Add this skill to your Excel toolkit, experiment with dynamic index lists, and explore integrations with CHOOSEROWS, FILTER, and Power Query to elevate your analytical workflows.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.