vba 将一列数字读入数组的最快方法
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11504024/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Fastest way to read a column of numbers into an array
提问by AZhu
Say if I have a column of numbers (how many of them could vary, but could be anywhere between 1000-10000) and I would like to read all of them into an array in VBA, what is the fastest way of doing so?
假设我有一列数字(其中有多少可能会有所不同,但可能介于 1000-10000 之间)并且我想将所有数字读入 VBA 中的数组,那么最快的方法是什么?
Obviously I can create an array of size 10000 and do a for/while-loop but is there any way that's faster than this?
显然我可以创建一个大小为 10000 的数组并执行 for/while 循环,但是有没有比这更快的方法?