> For the complete documentation index, see [llms.txt](https://docs.coherent.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherent.global/assistant/agent/workflows/edit-cells-ranges-and-sheets.md).

# Edit cells, ranges, and sheets

Agent can help update workbook content, formulas, formatting, sheets, and ranges.

Use this workflow when you want Agent to change the workbook, not just explain it. For important files, use Ask for edit mode so you can approve changes before they are applied.

## When to use this workflow

Use this workflow when you want Agent to make workbook changes such as:

* Writing values or formulas.
* Clearing ranges.
* Copying values or formulas.
* Formatting cells and ranges.
* Adding, renaming, or deleting sheets.
* Reusing workbook styles.

If you only want a review, use read-only mode and say that Agent should not change the workbook.

## Example prompts

* "Write these assumptions into `Assumptions!B5:B10`."
* "Format the header row to match the table above."
* "Add a new summary sheet for the selected data."
* "Copy the formulas from row 12 down through row 24."
* "Preview a cleanup plan for this sheet before making changes."

## Recommended steps

1. Tell Agent exactly what range or sheet to change.
2. If existing content should be replaced, say that clearly.
3. Ask for a preview when the change affects formulas, large ranges, or existing content.
4. Review the approval prompt before allowing the change.
5. Ask Agent to check the edited range after it finishes.

## Safer edit prompts

* "Preview the changes before writing anything."
* "Do not overwrite existing cells without asking me first."
* "Use Ask for edit mode and wait for approval before changing the workbook."
* "After editing, re-read the changed range and summarize what changed."

## Tip

Be explicit about replacement. "Add below the existing table" and "replace `Summary!A1:F20`" lead to very different actions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.coherent.global/assistant/agent/workflows/edit-cells-ranges-and-sheets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
