Skip to content

Instantly share code, notes, and snippets.

@aplitax
Forked from mpecka/ExcelRemoveAccents.vb
Created January 9, 2019 13:09
Show Gist options
  • Select an option

  • Save aplitax/916fc705585d2a1d7dd8af98be1a543d to your computer and use it in GitHub Desktop.

Select an option

Save aplitax/916fc705585d2a1d7dd8af98be1a543d 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