Function RemoveNarrow(str As String) As String
    Set regEx = CreateObject("vbscript.regexp")
    With regEx
        .Global = 1
        .Pattern = "[\x01-\x7f]+"
        RemoveNarrow = .Replace(str, "")
    End With
End Function



Function getCN(str As String) As String

    Dim iAsc As Integer
    Dim char As String * 1
    For i = 1 To Len(str)
        char = Mid(str, i, 1)
        iAsc = Asc(char)
        If (iAsc >= &HAA40 And iAsc <= &HFEA0) Or (iAsc >= &H8140 And iAsc <= &HA0FE) Then
            getCN = getCN & char
        End If
    Next
End Function

摘自ExcelHome

相关文章:

  • 2022-12-23
  • 2021-05-22
  • 2021-12-09
  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
  • 2022-01-01
猜你喜欢
  • 2021-08-18
  • 2021-06-09
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案