打开视图->宏->编辑,代码如下,cells(n,m)表示当前Excel表格第n行第m列</span>
Sub newdata() Dim i As Long For i = 1 To 10000 Cells(i, 1) = "numbe_r" & i Next i End Sub
注:Excel表格有行数限制,Excel2003:65536行;Excel2007/2010:1048576行。
打开视图->宏->编辑,代码如下,cells(n,m)表示当前Excel表格第n行第m列</span>
Sub newdata() Dim i As Long For i = 1 To 10000 Cells(i, 1) = "numbe_r" & i Next i End Sub
注:Excel表格有行数限制,Excel2003:65536行;Excel2007/2010:1048576行。
转载于:https://www.cnblogs.com/Rainbow-G/p/4080030.html