Skip to content

Instantly share code, notes, and snippets.

@scottdave
Forked from mpecka/ExcelRemoveAccents.vb
Created February 17, 2023 03:33
Show Gist options
  • Save scottdave/3d7cf14b78cdf3153e022e4cc0e8be40 to your computer and use it in GitHub Desktop.
Save scottdave/3d7cf14b78cdf3153e022e4cc0e8be40 to your computer and use it in GitHub Desktop.
Excel Remove Accents
Function StripAccent(thestring As String)
Dim A As String * 1
Dim B As String * 1
Dim i As Integer
Const AccChars= "áäčďéěíĺľňóôőöŕšťúůűüýřžÁÄČĎÉĚÍĹĽŇÓÔŐÖŔŠŤÚŮŰÜÝŘŽ"
Const RegChars= "aacdeeillnoooorstuuuuyrzAACDEEILLNOOOORSTUUUUYRZ"
For i = 1 To Len(AccChars)
A = Mid(AccChars, i, 1)
B = Mid(RegChars, i, 1)
thestring = Replace(thestring, A, B)
Next
StripAccent = thestring
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment