Hi All,
I am new to VBA. I want to convert all the arabic letters into English (ie. Translitertaion) Not translation. I have found the below sample code in google and I have just tested but it is not working
Const cyr = "123456789" 'the cyillic alphabet in order
Const lat = "abcdefghi" 'the latin alphabet in the same order
Function convertchar(inchar As String) As String
Location = InStr(cyr, inchar)
if location > 0 then convertchar = Mid(lat, Location, 1) else convertchar = " "
'this will return the appropriate latin letter or a space if there is a problem
End Function
Sub convertcells()
x = 1
Do While ActiveSheet.Cells(x, 1).Value <> ""
thisone = ActiveSheet.Cells(x, 1)
out = ""
For y = 1 To Len(thisone)
out = out & convertchar(Mid(thisone, y, 1))
Next
ActiveSheet.Cells(x, 2) = out
x = x + 1
Loop
End Sub
If I type any number in cell A1 and run the above convertcells, it is not converting to latin. Could you please help me.
If possible if you have sample code from Arabic to English, pls share.
Bookmarks