Code to INSERT alternate Blank rows in EXCEL
If you have rows of data which is hard to read and you would like to insert a blank row between each alternate rows do as directed.
Step :- 1 Open Excel
Step:- 2 Press Ctrl + F11
Step:- 3 Visual Basic Editor will open. Click on Insert -> Module
Step:- 4 Copy following code
Sub InsertBlackRows() 'Updateby20131127 Dim Rng As Range Dim WorkRng As Range Dim FirstRow As Integer, xRows As Integer, xCols As Integer On Error Resume Next xTitleId = "KutoolsforExcel" Set WorkRng = Application.Selection Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8) FirstRow = WorkRng.Row xRows = WorkRng.Rows.Count xCols = WorkRng.Columns.Count Application.ScreenUpdating = False WorkRng.Cells(xRows, 1).Resize(1, xCols).Select Do Until Selection.Row = FirstRow Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Offset(-1, 0).Select Loop Application.ScreenUpdating = True End Sub
Step:- 5 Then click on run button to run the code, then a dialog is diaplayed on the screen for you to select a range to insert blank rows.
Step:- 6 Click Ok, and a new blank row will be inserted between every two rows.