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

# putCell(_:atRow:column:)

Replaces the cell at the specified row and column with the new cell.

```
func putCell(_ newCell: NSCell, atRow row: Int, column col: Int)
```

## Parameters

`newCell`

The cell to insert into the matrix.

`row`

The row in which to place the new cell.

`col`

The column in which to place the new cell.

---

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)