Microsoft Excel Tutorial – How to insert a row in excel using VBA
How to insert rows in Excel using Macro – Excel VBA Insert Row
For a guide to how to edit macros for your own purposes, please click here.
In the video below we outline and explain how we can create a Macro in Microsoft Excel which will add a new row to our spreadsheet. This is very useful if you would like new data to appear at the top of your spreadsheet but keep data in chronological order. This macro uses VBA code which we will term “Insert Row VBA” and can be found in more detail below. This Excel Macro will Insert a row whenever the button is clicked. This Excel VBA is also handy when you want to insert multiple rows, as you can quickly and repeatedly press the created macro which will quickly insert new rows in Excel using the macro.
If you have any questions please post these onto the YouTube channel.
Excel Macro Insert row Video
The Insert Row Excel VBA code we outline in this tutorial is as follows.
Insert Row VBA
Selection.Borders.Weight = xlThin
You will need to change the Sheets(“Sheet1”) and Range(“A4”) to match your own needs. For example, if the sheet you was working on was named “Customers” and you wanted to add a new row to cell A3, these values would display like so.
As we mentioned above you can press this macro multiple times consecutively and the Excel VBA will insert multiple rows.
To download a copy of the workbook used in this video, please click the link below.
For more YouTube videos please visit my YouTube channel.
If this has been helpful in your projects then please like/subscribe to the channel.