作者:乔山办公网日期:
返回目录:excel表格制作
sub a()
for i=[a65536].end(3).row to 2 step -1
if range("A"&i)>range("A"&i-1) then
for j=1 to 3
rows(i).insert
next j
end if
next i
end sub
经测百试度,下面问的代答码可版用权
Dim i As Long
i = 3
Do
If Cells(i, 5).Value <> Cells(i - 1, 5).Value And Cells(i, 5).Value <> 0 Then
Rows(i).Insert shift:=xlDown
i = i + 1
End If
If Cells(i, 5) = 0 And i > Sheet1.UsedRange.Rows.Count Then Exit Do
i = i + 1
Loop