Insert Method
Applies To
Characters object, Range object, ShapeNodes collection object.
Description
Syntax 1 (Range object): Inserts a cell or a range of cells into the worksheet or macro sheet and shifts other cells away to make space.
Syntax 2 (Characters object): Inserts a string preceding the selected characters.
Syntax 1
expression.Insert(Shift)
Syntax 2
expression.Insert(String)
expression Required. An expression that returns a Characters or Range object.
Shift Optional Variant. Specifies which way to shift the cells. Can be one of the following XlInsertShiftDirection constants: xlShiftToRight or xlShiftDown. If this argument is omitted, Microsoft Excel decides based on the shape of the range.
String Required String. The string to insert.
Example
This example inserts a new row before row four on Sheet1.
Worksheets("Sheet1").Rows(4).Insert
This example inserts new cells at the range A1:C5 on Sheet1 and shifts cells downward.
Worksheets("Sheet1").Range("A1:C5").Insert shift:=xlShiftDown
This example inserts a new row at the active cell. The example must be run from a worksheet.
ActiveCell.EntireRow.Insert