Monday, 10 September 2012

Excel VBA Macro To Insert A Entire 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 INSERBLROW()
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

No comments:

Post a Comment

Follow Me by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts