返回数组中元素、行或列的数目。
语法
ALEN(ArrayName [, nArrayAttribute])
参数
ArrayName
指定数组名。如果参数仅包含数组名,ALEN( ) 函数则返回元素的数目。
nArrayAttribute
确定 ALEN( ) 函数返回的是数组元素的数目、数组的行数,还是数组的列数。nArrayAttribute 可以取值为 0、1 或 2。
0 | 指定返回数组元素数目。省略 nArrayAttribute 与指定 nArrayAttribute 为 0 作用相同。 |
1 | 指定返回数组的行数。 |
2 | 指定返回数组的列数。如果数组是一维数组,则 ALEN( ) 函数返回 0(没有列)。 |
返回值类型
数值型