Insert a row after each account no change

  • Thread starter Thread starter Guest
  • Start date Start date
Sub Accounts()
Dim rng As Range, i As Long
Set rng = Cells(Rows.Count, 1).End(xlUp)
For i = rng.Row To 1 Step -1
If Cells(i + 1, 1).Value <> Cells(i, 1).Value Then
Cells(i + 1, 1).EntireRow.Insert
End If
Next

End Sub

--
Regards,
Tom Ogilvy



Janmy said:
How to set the macro for insert a row automatically after each account no
?
 
Back
Top