<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableView/selectColumnIndexes(_:byExtendingSelection:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTableView(im)selectColumnIndexes:byExtendingSelection:"
  },
  "title" : "selectColumnIndexes(_:byExtendingSelection:)"
}
-->

# selectColumnIndexes(_:byExtendingSelection:)

Sets the column selection using `indexes` possibly extending the selection.

```
func selectColumnIndexes(_ indexes: IndexSet, byExtendingSelection extend: Bool)
```

## Parameters

`indexes`

The column indexes to select.

`extend`

<doc://com.apple.documentation/documentation/Swift/true> if the selection should be extended, <doc://com.apple.documentation/documentation/Swift/false> if the current selection should be changed.

## Discussion

Replaces the deprecated [`selectColumn:byExtendingSelection:`](/documentation/AppKit/NSTableView/selectColumn:byExtendingSelection:) method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)