Monday, September 10, 2012

Excel VBA Macro to Insert a Blank Row between Individual Data Items

Excel VBA Macro to insert a entire row between individual data items based on first column
'We should sort the data before run a macro to insert blank row'
Sub Insert_Blank_Row()
Dim X As Integer
Dim Y As Integer
Dim z As Integer
Dim a As String

For X = 2 To 100

If Cells(X, 1) <> "" And Cells(X, 1) <> Cells(X + 1, 1) Then
Cells(X, 1).Offset(1, 0).EntireRow.Insert
End If

Next X
End Sub

Thanks,Tamatam

No comments:

Post a Comment

Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.

Featured Post from this Blog

How to compare Current Snapshot Data with Previous Snapshot in Power BI

How to Dynamically compare two Snapshots Data in Power BI Scenario: Suppose, we have a sample Sales data, which is stored with Monthly Snaps...

Popular Posts from this Blog