Copy Row 1 Below the Active Cell with an Excel VBA Macro
Question details
The user wants to copy a template in row 1 and insert it immediately below the row containing the active cell.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet uses row 1 as a template, including checkboxes, for new rows.
- Observed behavior
- The desired result is a copy of the template inserted below the active row, with the template checkboxes hidden when row 1 is hidden.
Make sure row 1 contains the template and the worksheet allows rows to be inserted. Save the workbook as an Excel Macro-Enabled Workbook (.xlsm) and enable macros only if you trust the workbook.
Insert a Copy of Row 1 Using an Excel VBA Macro
Use this macro to insert the template immediately below the row containing the selected cell.
In Excel, open the workbook and press Alt+F11. In the VBA editor, select the workbook and choose Insert > Module.
Paste this code into the module: Sub InsertTemplateRow() Rows(1).Copy ActiveCell.Offset(1).Insert End Sub
Return to the worksheet and click any cell in the row immediately above where you want the copied template inserted.
Press Alt+F8, select InsertTemplateRow, and click Run. Excel inserts a copy of row 1 below the active row.
For each template checkbox, right-click it, choose Format Control, open the Properties tab, and select Move and size with cells. Then hide row 1 using its row header.

Work with Template Rows in WPS Spreadsheets
WPS Office is a free, lightweight Office alternative with a familiar spreadsheet interface. Open compatible Excel files and work with template rows while moving between office suites.

Frequently Asked Questions
Does the macro replace the row below the active cell?
No. ActiveCell.Offset(1).Insert inserts the copied row below the active cell, shifting existing rows downward.
How do I keep the template checkboxes from appearing when row 1 is hidden?
Right-click each form-control checkbox, choose Format Control > Properties, and select Move and size with cells. Then hide row 1 from its row header.
How do I save the macro in my workbook?
Choose File > Save As and select Excel Macro-Enabled Workbook (.xlsm). A standard .xlsx file cannot retain VBA macros.
Which worksheet does the macro use?
The macro uses row 1 and the active cell on the active worksheet. Select the intended worksheet and cell before running it.




