Created
June 29, 2012 19:44
-
-
Save jenikm/3020221 to your computer and use it in GitHub Desktop.
VBA Russian transliterate function
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
'http://www.utf8-chartable.de/unicode-utf8-table.pl?start=1024&utf8=-&unicodeinhtml=dec | |
'use numerical HTML column | |
Function Transliterate(Russian As String) | |
letters = Array("A", "B", "V", "G", "D", "E", "YO", "ZH", "Z", "I", "Y", "K", "L", "M", "N", "O", "P", "R", "S", "T", "U", "F", "H", "TZ", "CH", "SH", "SCH", "", "Y", "", "E", "YU", "YA", "a", "b", "v", "g", "d", "e", "yo", "zh", "z", "i", "y", "k", "l", "m", "n", "o", "p", "r", "s", "t", "u", "f", "h", "tz", "ch", "sh", "sch", "", "y", "", "e", "yu", "ya", "#") | |
i = 1040 | |
For Each letter In letters | |
Dim val As String | |
Select Case letter | |
Case "YO" | |
val = ChrW(1025) | |
Case "yo" | |
val = ChrW(1105) | |
Case "#" | |
val = ChrW(8470) | |
Case Else | |
val = ChrW(i) | |
i = i + 1 | |
End Select | |
Russian = Replace(Russian, val, letter) | |
Next letter | |
Transliterate = Russian | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For one column (E2)