选中数据区域,执行宏 GetLetter 选出的数据放在 Sheet2 的对应位置。
Sub GetLetter()
For Each rg In Selection
Sheet2.Cells(rg.Row, rg.Column) = GetOne(rg.Value)
Next
End Sub
Function GetOne(v)
GetOne = ""
For i = 1 To Len(v)
c = Mid(v, i, 1)
s = Asc(c)
If (s > 64 And s < 91) Or (s > 96 And s < 123) Then
GetOne = GetOne & c
End If
Next
End Function