高效提升竞争力的B2B系统搭建策略与AI应用探索
448
2022-12-02
EXCEL 自定义函数提取字符串中的数字
自定义函数提取字符串中的数字
Function GetNB(rng As Range)If rng <> "" ThenFor i = 1 To Len(rng)tmp = Mid(rng, i, 1)If IsNumeric(tmp) Or tmp Like "[+-\*\/^%)()]" And Not tmp Like "[A-Z?!~@=_,;|\[]" Then GetNB = GetNB & tmpNextElseGetNB = ""End IfEnd Function
Function CountNB(rng As Range)If rng <> "" ThenFor i = 1 To Len(rng)tmp = Mid(rng, i, 1)If IsNumeric(tmp) Or tmp Like "[+-\*\/^%()]" And Not tmp Like "[A-Z?!~@=_,;|\[]" Then CountNB = CountNB & tmpNextCountNB = Application.Evaluate(CountNB)ElseCountNB = ""End IfEnd Function
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。