# Delete Cell/Range

Delete the specified cell/range of the excel sheet and shift cells if required.

{% hint style="info" %}
This activity can only be used after the [Open Excel File activity.](/rpa-studio/microsoft-office/excel/open-excel-file.md)
{% endhint %}

### Input

* **Input** : [`ExcelHandle Variable`](/getting-started/rpa-studio/variables.md#excelhandle)![](/files/-MVREnwPf_D3-qJvjjYd)\
  A variable name that references the opened excel file handle.
* **Sheet Name** : [`String Argument`](/getting-started/rpa-studio/arguments.md#string)![](/files/-MVREnwPf_D3-qJvjjYd)\
  The name of the sheet in which the cell/range is to be deleted.

### Options

* **Range** : [`String Argument`](/getting-started/rpa-studio/arguments.md#string)![](/files/-MVREnwPf_D3-qJvjjYd)\
  The cell/range of the excel sheet is to be deleted.

{% hint style="info" %}
The range is specified in `A1:E10` or `A1` format. `A1:E10` will select all cells of the first five columns from row 1 to 10. `A1` will select the first cell from the first row.
{% endhint %}

* **Shift Cells** :
  * `True` - Cells will be shifted according to the Shift Option.
  * `False` - Delete only cell data and leave formatting unchanged. `Default`
* **Shift Option** : `Optional`

  The format in which cells should be shifted to fill the deleted cell/range.
* `ShiftUp` - Cells will be shifted up after deletion in the given range. `Default`
* `ShiftLeft` - Cells will be shifted left after deletion in the given range.
* `EntireColumn` - Delete the entire column and shift left.
* `EntireRow` - Delete the entire row and shift up.


---

# Agent Instructions: 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:

```
GET https://docs.visualyze.ai/rpa-studio/microsoft-office/excel/range/delete-range.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
