Vigyata.AI
Is this your channel?

How To Insert Row Under Header Automatically

86 views· 7 likes· 4:37· May 15, 2026

Google Sheets Apps Script: Insert a New Row Under a Header (Custom Menu + Trigger) This episode shows how to insert a new row directly under a header row in Google Sheets without copying the header formatting. It explains why using “Insert row below” on the header causes formatting issues and demonstrates inserting a row before row 2 so the formatting is copied from the row beneath the header instead. The script is built in Extensions → Apps Script using SpreadsheetApp to get the active spreadsheet and sheet, then inserting a row before index 2. It also adds a custom menu via an onOpen function so you can run the insert action from the sheet UI, including the first-time authorization step. Finally, it covers setting up a time-driven trigger to run the function automatically on a schedule, checking executions for errors, and editing or deleting triggers. 00:00 Header Row Problem 00:25 Manual Workaround 00:32 Apps Script Function 01:20 Custom Menu Shortcut 02:06 Authorize and Test 02:43 Automate With Triggers 03:37 Manage or Delete Trigger 04:11 Wrap Up and Subscribe

🎬 More from Better Sheets