EXCEL中插入空行,在宏中用什么命令
For i = 15 To 1500 sht1.Activate ✀外循环(表1符合条件的)与表3中不存在的记录比If sht1.Cells(i, 5) = "已授权" Then B1a = sht1.Cells(i, 1)✀取符合条件的记录的序号 sht1.Range("A" & i, "F" & i).Select ✀选中该行 Selection.Copy ✀仅为添加而拷贝(未修改、删除) For j = 15 To1500 ’内循环,表3 sht3.Activate If B1a = sht3.Cells(j, 1) Then ✀序号符合相等条件的为,已存在 Else If B1a > sht3.Cells(j, 1) And B1a < sht3.Cells(j + 1, 1) Then sht3.Cells(j, 1).Activate ✀激活符合条件的单元格 sht3.Cells(j, 1).Select Rows(j + 1).Insert Shift:=xlDown,CopyOrigin:=xlFormatFromLeftOrAbove sht3.Range("A" & j+1, "F" & j+1).Select ActiveSheet.Paste End If End If Next jEnd IfNext i