Insert Row in Excel: Shortcut and VBA Options

VBA & macros · Updated November 20, 2026

In Excel for Microsoft 365 on Windows, select the row where the new row should go with Shift+Space, then press Ctrl+Shift++ (on a standard keyboard, this is usually Ctrl+Shift+=). To insert a row with VBA above the active cell, use Rows(ActiveCell.Row).Insert in a macro; the examples below show how to do that safely and how the behavior differs for Excel tables.

Insert a worksheet row with the keyboard shortcut

The keyboard method is quickest when you know where the row belongs. Excel inserts a new worksheet row above the selected row, shifting existing content down. First select a cell in the row that should move down, or select the entire row, and then use the insertion shortcut.

  1. Click a cell in the row where the new blank row should appear above.
  2. Press Shift+Space to select the entire worksheet row. If you already selected the row by clicking its number at the left edge, skip this step.
  3. Press Ctrl+Shift++. On many standard keyboards, the plus sign shares the equals key, so press Ctrl+Shift+=.

If you have a separate numeric keypad, Ctrl++ may be available as the equivalent insert command. The keyboard layout and Excel settings can affect which key combination is easiest to use. Selecting the row first is the most reliable way to make clear that you want a whole worksheet row, rather than the Insert dialog for shifting individual cells.

You can insert multiple rows in one action: select the same number of existing row headers as the number of blank rows you want, then use the shortcut. For example, selecting rows 8 and 9 and inserting adds two rows above row 8. Excel does not require those selected rows to be empty.

Choose where the new row goes

Excel inserts worksheet rows above the selected row; there is not a separate insert-below command in the standard shortcut. To add a row between rows 12 and 13, select row 13 and insert. To add one after the last data row, select the row immediately below the data and insert there. This placement rule is important when using VBA too: inserting at row 13 pushes the former row 13 downward.

For a quick mouse alternative, right-click a row number and choose Insert. You can also select a row and use Home > Insert > Insert Sheet Rows. The ribbon option is useful when you have forgotten the keyboard combination or are demonstrating the operation to another user. If you select cells rather than a row, Excel may offer choices such as shifting cells down or inserting an entire row, so check the selection and dialog before confirming.

Insert a row with a VBA macro

A macro is useful when row insertion is part of a repeated workflow, such as preparing a template or adding a line before a report section. This example inserts one worksheet row above the active cell. It stores the worksheet and row number in declared variables, and asks Excel to carry formatting down from the row above the insertion point.

Sub InsertRowAboveActiveCell()
    Dim targetSheet As Worksheet
    Dim targetRow As Long

    ' Remember the active cell location before inserting.
    Set targetSheet = ActiveCell.Worksheet
    targetRow = ActiveCell.Row

    ' Insert a full worksheet row above the active cell.
    targetSheet.Rows(targetRow).Insert _
        Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End Sub

To use it, save a copy of the workbook first, open the Visual Basic Editor with Alt+F11 on Windows, choose Insert > Module, and paste the code into the module. Return to Excel, click a cell in the row that should move down, and run the macro from Developer > Macros. If the Developer tab is hidden, enable it through File > Options > Customize Ribbon and select Developer.

Save a workbook containing VBA as an Excel Macro-Enabled Workbook (.xlsm) if you need to retain the macro. Excel macros cannot be undone with Ctrl+Z, so check the active cell and workbook before running one. Keep an untouched copy or use a test workbook when adapting a macro, and only enable macros from sources you trust.

Insert a row in an Excel table

An Excel table is a structured data range created with Insert > Table or Ctrl+T. A table row is not quite the same thing as an entire worksheet row: it belongs to the table and can carry the table’s formulas, formatting, and filters without adding a blank row across every other column on the sheet.

To add a table record, click the last cell in the table and press Tab; Excel creates a new table row when the selection is at the end of the table. You can also right-click a table cell and choose Insert > Table Rows Above to add a row within the table. The exact menu wording can depend on where you right-click. A worksheet-row shortcut can insert across the sheet, so use the table-specific command when you want to preserve the table as a clearly bounded data list.

In VBA, a table is represented by a ListObject. This example adds a record at the bottom of a table named SalesTable on the active sheet:

Sub AddRowToSalesTable()
    Dim targetSheet As Worksheet
    Dim salesTable As ListObject

    ' Find the table by its name on the active sheet.
    Set targetSheet = ActiveSheet
    Set salesTable = targetSheet.ListObjects("SalesTable")

    ' Add one table row at the bottom.
    salesTable.ListRows.Add
End Sub

Replace the table name with the name shown under Table Design > Table Name when the table is selected. This code adds to the table rather than inserting a blank worksheet row at the active cell. If the table name is wrong or the table is on another sheet, the macro will raise an error, so confirm both before running it.

What happens to formatting and formulas?

When you insert a worksheet row, Excel shifts affected cells down and generally carries formatting from a neighboring row. The shortcut does not let you choose the formatting source. With the mouse, the Insert Options button may appear near the inserted cells, offering formatting choices such as matching the row above, matching the row below, or clearing formatting. In VBA, the sample’s CopyOrigin:=xlFormatFromLeftOrAbove explicitly requests formatting from the row above; changing that option to xlFormatFromRightOrBelow uses the other neighboring direction.

Formulas that refer to cells moved by the insertion are usually adjusted by Excel so references continue to point to the intended data. For example, inserting a row within a referenced range often expands that range. However, formulas that use fixed text references, external workbook links, or complex indirect references may not behave as expected. After inserting rows into a calculation sheet, inspect important totals and formulas instead of assuming every reference has the intended meaning.

In a table, calculated-column formulas may automatically fill into the new table row, and table formatting generally continues. That convenience is one reason to use a table row for new records instead of inserting a whole worksheet row when the data is meant to remain part of a structured list.

Common shortcut and macro problems

  • The Insert dialog appears. You may have selected a cell rather than the entire row. Press Esc, select the row with Shift+Space, and try the insertion shortcut again.
  • The wrong location changes. Remember that Excel inserts above the selected row. Select the row that should be pushed down, not the row that should remain immediately above the new blank line.
  • The macro inserts on an unexpected sheet. The first example uses the worksheet containing the active cell. Click the intended worksheet and cell before running it. A macro that uses ActiveSheet depends on the current selection and can be less predictable in a multi-sheet workflow.
  • Excel refuses to insert. A protected worksheet may block row insertion unless the sheet protection permits it. Merged cells, filters, or a full worksheet can also complicate insertion. Check the sheet’s protection and layout, and avoid changing a shared or important workbook without permission.
  • The macro is missing after saving. A standard .xlsx file does not retain VBA code. Save as .xlsm when the macro needs to remain in the workbook.

Also distinguish inserting a blank row from clearing a row. The shortcut adds space and shifts existing cells; pressing Delete or choosing Clear Contents removes values but leaves the row in place. If you only want to remove old values, insertion is the wrong operation.

Windows, Mac, and Excel for the web

The instructions above target Excel for Microsoft 365 on Windows. In Excel for Mac, select the row with Shift+Space, then use Control+Shift+= to insert. Depending on the keyboard layout, the plus sign may require the Shift key with the equals key. The menu route—right-click the row number and choose Insert—is a practical fallback when the key combination differs on a particular keyboard.

Excel for the web supports inserting worksheet rows through the row header context menu and ribbon, but VBA macros cannot be created or run in the browser version. Open the workbook in the desktop Excel app to use the Visual Basic Editor and run VBA. A workbook can contain macros while being viewed in the web app, but browser Excel does not execute that VBA code.

Frequently Asked Questions

What is the shortcut to insert a row in Excel?
On Windows, select the target row with Shift+Space, then press Ctrl+Shift++ (often typed as Ctrl+Shift+=). On Mac, use Control+Shift+= after selecting the row.

How do I insert a row below the current row?
Excel inserts above the selection. Select the row immediately below the place you want the blank row, then insert. For example, to put a row between rows 5 and 6, select row 6.

Can I insert several rows at once?
Yes. Select as many existing row headers as the number of rows you want to add, then use the insert command. Selecting three rows and inserting creates three blank rows above the first selected row.

Can Ctrl+Z undo a VBA row insertion?
Normally, no. Running a VBA macro clears Excel’s standard undo history, so Ctrl+Z will not reverse the macro’s insertion. Save a separate copy before running code that changes worksheet structure.

Should I use a worksheet row or a table row?
Use a table-row command when adding a record to an Excel table, so the new item remains within the table and can inherit its formulas and formatting. Insert an entire worksheet row when you need space across the sheet, including outside the table.

Related

Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.

More in VBA & macros

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.