将VBA中多维数组的整行返回到一维数组 [英] return an entire row of a multidimensional array in VBA to a one dimensional array

查看:75
本文介绍了将VBA中多维数组的整行返回到一维数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在VBA中,有没有什么办法可以将多维数组的一整行的值返回给一维数组?

Is there any way to return the value of an entire row of a multidimensional array to a one dimensional array In VBA?

类似于,arr_1dim = arr_2dim(3,:) 是一个 matlab 表达式,用于将 arr_2dim 数组的第 3 行分配给 arr_1dim一次拉伸.

Something like, arr_1dim = arr_2dim(3,:) is a matlab expression for assigning the row 3 of arr_2dim array to arr_1dim in one single stretch.

Excel VBA 中是否有类似的更便宜的方法?

Is there any similar less expensive method in Excel VBA?

推荐答案

不,没有 VBA 函数来获取行或列.只能自己写,或者看这里:
http://www.cpearson.com/excel/vbaarrays.htm

No there is no VBA-function to get a row or column. You can only write it yourself, or take a look here:
http://www.cpearson.com/excel/vbaarrays.htm

这篇关于将VBA中多维数组的整行返回到一维数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆