发布网友 发布时间:2022-05-05 15:51
共2个回答
热心网友 时间:2023-10-08 23:15
括号要是英文的。别忘了启用宏。
看图操作
Function 计算(Rng As Range) As Double
Dim I As Long, S As String, S1 As String
Dim Scr As Object, S2 As String
S = Rng.Text
For I = 1 To Len(S)
S2 = Mid(S, I, 1)
If InStr("()0123456789.+-*/^", S2) > 0 Then
S1 = S1 & Mid(S, I, 1)
End If
Next
计算 = Evaluate(S1)
End Function
热心网友 时间:2023-10-08 23:16
这个没有办法,只能删除文字,电脑不认识文字内容。