Creating a macro in Microsoft Excel offers users the ability to automate repetitive and predictable tasks in the program, often saving hours of time.
Insert Blank Rows Between Data Entries
If you would like to create a macro that will insert 2 blank rows into an existing spreadsheet after every 2 data entries, there is an available macro that can help you do so. The end result should look like this:
Inserting Multiple Blank Rows Between Existing Data
Utilizing the following macro will get you the result pictured above:
Dim j As Long, r As Range
j = InputBox("type the number of rows to be insered")
Set r = Range("A2")
Range(r.Offset(1, 0), r.Offset(j, 0)).EntireRow.Insert
Set r = Cells(r.Row + j + 1, 1)
'MsgBox r.Address(the apostrophe in the beginning of this line makes this line non operable)
If r.Offset(1, 0) = "" Then Exit Do
Published by aakai1056
Latest update on September 30, 2015 at 03:19 PM by ChristinaCCM.