Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/24.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
Excel 用vba计算中值_Excel_Vba - Fatal编程技术网

Excel 用vba计算中值

Excel 用vba计算中值,excel,vba,Excel,Vba,如何使用VBA计算超过30个值范围的中值?工作表FORMULA方法只能处理30个值。我现在的功能是这样的 Function medval(Longitudes As Range) 'I want the median for values in the range (here 'Longitudes') B2:B100) End Function 您可以根据需要对任意多个连续数据值进行平均/求中值: =中间带(A1:A65500)将起作用 但在Excel2003中,单个引用不能超过30个(20

如何使用VBA计算超过30个值范围的中值?
工作表FORMULA
方法只能处理30个值。我现在的功能是这样的

Function medval(Longitudes As Range)
'I want the median for values in the range (here 'Longitudes') B2:B100)
End Function

您可以根据需要对任意多个连续数据值进行平均/求中值:

=中间带(A1:A65500)
将起作用

但在Excel2003中,单个引用不能超过30个(2007年可以有255个引用)

i、 e

=中间值(A1、A2、A3、…A31)
不起作用


只要一系列值是连续的,它们就可以工作。

工作表公式方法只能处理30个值
-它最多可以使用30个单独的范围/值作为参数,但是
工作表函数。无论
经度中有多少个单元格,中值(经度)
仍然有效。
range Thank@simoco。今天我把很多简单的事情复杂化了,谢谢你。我今天把简单的事情搞得很复杂