Last active
June 4, 2019 14:50
-
-
Save longtth/a7f2c8c468260de88e91bbfc7d34f950 to your computer and use it in GitHub Desktop.
Loại bỏ các kí tự không phải chữ & số (non-alpha-numeric) trong Excel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function CleanCode(Rng As Range) | |
| Dim strTemp As String | |
| Dim n As Long | |
| For n = 1 To Len(Rng) | |
| Select Case Asc(Mid(UCase(Rng), n, 1)) | |
| Case 48 To 57, 65 To 90 | |
| strTemp = strTemp & Mid(UCase(Rng), n, 1) | |
| End Select | |
| Next | |
| CleanCode = strTemp | |
| End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment