Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在VBA中查找数组中的整数_Vba_Excel - Fatal编程技术网

在VBA中查找数组中的整数

在VBA中查找数组中的整数,vba,excel,Vba,Excel,嗨,我正在使用VBA for Excel 我想知道是否有一种简单的方法来确定整数数组中是否有某个数字,比如字符串的Filter函数,只用于整数 还是应该执行for循环并遍历数组中的所有值? 多谢各位 如果使用excel,可以使用以下功能: nindex = Application.Match(value, myArray, 0) + LBound(myArray) - 1 我可能说得太早了,但根据我的经验,我会循环。@Bramat,在这里看到我的答案:@simoco我写了一个非常类似的函数-但

嗨,我正在使用VBA for Excel

我想知道是否有一种简单的方法来确定整数数组中是否有某个数字,比如字符串的
Filter
函数,只用于整数

还是应该执行for循环并遍历数组中的所有值?

多谢各位

如果使用excel,可以使用以下功能:

nindex = Application.Match(value, myArray, 0) + LBound(myArray) - 1

我可能说得太早了,但根据我的经验,我会循环。@Bramat,在这里看到我的答案:@simoco我写了一个非常类似的函数-但谢谢!!