Skip to main content

Range.Delete method

Deletes the object.


expression.Delete (Shift)

expression A variable that represents a Range object.


Name Required/Optional Data type Description
Shift Optional Variant Used only with Range objects. Specifies how to shift cells to replace deleted cells.

Can be one of the following XlDeleteShiftDirection constants: xlShiftToLeft or xlShiftUp.

If this argument is omitted, Microsoft Excel decides based on the shape of the range.

Return value



The following example deletes the third entire row.


Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>