excel怎么自定义函数计算功率
1、打开EXCEL电子表格,点击1处的“开发工具”选项卡。

2、点1处的Visual Basic

3、如图骤添加一个模块。

4、输入视在功率自定议函数代码:
Function APP_Power(v, i)
APP_Power = 1.732 * v * i
End Function
点保存后返回EXCEL表格。
计算的方法要参见三相有功的公式,不同的计算在函数体内写不同的计算公式。

5、在D3的单元格中输入“=APP_Power(A3,B3)”回车后就计算出来了。

6、一样可以拖动填充计算。

7、同时输入有功和无功的自定义函数。
'有功功率计算
Function AVE_power(v As Variant, i As Variant, pf As Variant)
Dim apower As Variant
apower = 1.732 * v * i
AVE_power = apower * pf
End Function
'无功功率计算
Function REA_power(v As Variant, i As Variant, pf As Variant)
Dim apower, avpower As Variant
apower = APP_Power(v, i)
avpower = AVE_power(v, i, pf)
REA_power = Sqr(apower * apower - avpower * avpower)
End Function

8、可以使用自定义函数在excel表格中进行计算,如图所示。


声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:39
阅读量:69
阅读量:56
阅读量:89
阅读量:192