'自定义计算函数
Function JS(ByVal Expressions As String) As String
Dim Mssc As Object
Set Mssc = CreateObject("MSScriptControl.ScriptControl")
Mssc.Language = "vbscript"
On Error GoTo EvalErr
JS = Mssc.Eval(Expressions)
Exit Function
EvalErr:
Exit Function
End Function
Private Sub Command1_Click()
'引用函数举例:
T = "1.5+(6-4)*3-1"
Text1 = T & "=" & JS(T)
End Sub
‘请采纳!谢谢!
=A1+B1*100-C1/3+D1+E1
A1 B1 C1 D1 E1是5个单元格,输入数据即可