启用开发工具
方式一:【右键Sheet1 】->【查看代码】
方式二:【开发者工具】->【Visual Basic】
Function chinese(rng As String)
Dim regx As Object
Dim strs, str, i
Set regx = CreateObject("vbscript.regexp")
With regx
.Global = True
.Pattern = "[\u4e00-\u9fa5]"
Set strs = .Execute(rng)
For Each i In strs
str = str & i
Next
If Len(str) > 0 Then
chinese = str
Else
chinese = ""
End If
End With
End Function