添加行的VBA小程序
Sub addrows1()
Dim i As Integer
i = 1
Sheets("yzm").Select
For i = 3 To 8000
Rows(i).Select
If ((Cells(i, 1).Value) <> (Cells(i - 1, 1).Value)) Then
'MsgBox (Cells(i, 1).Value + " " + Cells(i - 1, 1).Value + " <> ")
Rows(i).Insert
i = i + 1
Else
'MsgBox ("=")
End If
Next
End Sub