⑴ 怎么才能在excel中根据E列数值自动插入相应的空白行数并进行内容填充
For i = 2 To Range("e65536").End(xlUp).Row '循环E列内容
Cells(i + m, 3) = Cells(i + m, 4) 'D列内容填入C列
For y = 1 To Cells(i + m, 5) - 1 '循环插入
Rows(i + m & ":" & i + m).Select '选择位置
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove '插入
Cells(i + m, 3) = Cells(i + m + 1, 4) 'D列内容填入C列
Cells(i + m, 1) = Cells(i + m + 1, 1)
Cells(i + m, 2) = Cells(i + m + 1, 2)
m = m + 1 '因为插入了行,循环到的位置要+1
Next y
Next i