Sub test()
Dim 数组() As Integer '定义动态数组
Dim n As Long
Dim i As Integer
n = Application.WorksheetFunction.CountA(Range("A:A")) '确定A列数据数量
ReDim 数组(1 To n) As Integer '根据A列数据重新定义数组
For i = 1 To n
数组(i) = Cells(i, 1) '给数组赋值
Next
End Sub
sub t()
mrow=cells(rows.count,1).end(3).row
Arr=range(cells(1,1),cells(mrow,1))
end sub