Excel去除单元格中的汉字

Alt+F11,插入,模块

Function RemoveChinese(rng As Range)

s = Len(rng.Text)

For i = 1 To s

txt = StrConv(Mid(rng.Text, i, 1), vbNarrow)

txt2 = StrConv(Mid(rng.Text, i, 1), vbWide)

If txt <> txt2 Then

RemoveChinese = RemoveChinese & Mid(rng.Text, i, 1)

Else: Exit For

End If

Next i

End Function

posted @ 2018-01-23 20:38  风谷逍遥客  阅读(5100)  评论(0编辑  收藏  举报