Excel去除中文,只留英文和数字

来源:互联网 发布:数据挖掘导论中文答案 编辑:程序博客网 时间:2024/05/16 13:50

在Excel中点击宏-》编辑器,右键添加模块,写入下面内容:

Function tet(s As String) As String
    Dim str As String
    str = ""
    For i = 1 To Len(s)
        If Strings.Asc(Mid(s, i, 1)) > 0 Then
            str = str + Mid(s, i, 1)
        End If
    Next i
    tet = str
End Function

这就可以使用自定义函数了,=tet(A1),就会得到结果。

原创粉丝点击