怎么让带文字备注的计算式得出值
怎么让带文字备注的计算式得出值
Function 计算(rng As Range)
Set re = CreateObject("vbscript.regexp")
With re
.Global = True
.Pattern = "[^0-9 \+ \- \* \/ \.]+"
If rng = "" Then Exit Function
计算 = Evaluate(.Replace(rng, ""))
End With
End Function
操作设备: 电脑 操作系统: windows 10 操作版本: WPS Office 2019 PC个人版
是否解决了你的问题?