T
Tom
I am currently using this VBA, but would like for it to insert (2) rows
instead of (1), how can I do that?
TFTH,
Tom
Sub InsertRows()
StartRow = 2 'Change the 2 to the row actual data start
DataColumn = 5 'Change the 1 to the column where your data is
i = StartRow + 1
While Cells(i, DataColumn) <> ""
If Cells(i, DataColumn) <> Cells(i - 1, DataColumn) Then
Cells(i, DataColumn).EntireRow.Insert
i = i + 1
End If
i = i + 1
Wend
End Sub
instead of (1), how can I do that?
TFTH,
Tom
Sub InsertRows()
StartRow = 2 'Change the 2 to the row actual data start
DataColumn = 5 'Change the 1 to the column where your data is
i = StartRow + 1
While Cells(i, DataColumn) <> ""
If Cells(i, DataColumn) <> Cells(i - 1, DataColumn) Then
Cells(i, DataColumn).EntireRow.Insert
i = i + 1
End If
i = i + 1
Wend
End Sub