如何在一个语句中将不连续的范围放入数组? [英] How to put discontiguous range into array in a statement?
本文介绍了如何在一个语句中将不连续的范围放入数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
myArray = [A1:C4]
myArray = [A1:C4]
将所有单元格放入myArray。很棒。
will put all cells into myArray. Great.
但是,如果范围不连续:
But, if range is discontiguous:
myArray = [$ A $ 2:$ C $ 2,$ A $ 4:$ C $ 4]
myArray = [$A$2:$C$2,$A$4:$C$4]
只会将 last 行放入myArray。
will only put the last row into myArray.
如何将全部没有循环的myArray中不连续范围的行?
How to put all rows of a discontiguous range into myArray without looping?
thx!
推荐答案
嗨
我不知道你在做什么,但这对我有用。
I don't know what you're doing but this works for me.
Sub aray()
For每个c In数组("
Sub aray()
For Each c In Array("
A
2:
这篇关于如何在一个语句中将不连续的范围放入数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文