Arabic Numbers

Joined
Mar 8, 2017
Messages
4
Reaction score
1
hello there

i have MS Office 2016 Professional Plus ... im trying to write arabic numbers but its not working ...
can you guide me how to do it ?
thank you
 
Joined
Aug 3, 2011
Messages
70
Reaction score
6
I need a little more information here - are you trying to type the numbers (0123... etc) and then get them to appear as Arabic instead?
 
Joined
Mar 9, 2017
Messages
5
Reaction score
3
Technically speaking, the numerals we use, 0-9 are Arabic, but if you want the actual Arabic symbols, you'll have to use unicode, which means going into VBA. You can make a simple function:

Code:
Option Explicit
Function Dec2Arab(ByVal dec As Integer)
Dim dec_len As Integer
Dim arabcode As String
Dim i As Integer
Dim examchar As Integer
dec_len = Len(dec_len)
For i = 1 To dec_len + 1
    examchar = Mid(dec, i, 1) + 1632
    arabcode = arabcode & ChrW(examchar)
Next
Dec2Arab = arabcode
End Function

That will only handle integers (no decimals), but I'm not sure what you're looking for...
 
Joined
Mar 8, 2017
Messages
4
Reaction score
1
well yes i wanna write ( 0 1 2 3 4 .... 9 ) and make them appear in arabic ...
if i go to " Control Panel\Clock, Language, and Region " and change the format to arabic ... ill be able to make arabic numbers appear by clicking on " format cells " alignment and put the text from right to left ... but i dont want to change the whole system format to arabic :D ...
also ... in the previous versions of office i believe there was an option somewhere under " file , options , advanced " and change the numeral option to context .. that used to make arabic letters appear ...
 
Joined
Aug 3, 2011
Messages
70
Reaction score
6
Ah ok, I understand. Simple way to do it would be to highlight the cells, right click and select Format Cells, then within the Numbers tab select Custom, and type [$-2060000]0 in the text box, then click OK. That should hopefully do it for you :)
 
Joined
Mar 9, 2017
Messages
5
Reaction score
3
I forgot that Arabic is right-to-left. Change that code to:

Code:
Option Explicit
Function Dec2Arab(ByVal dec As Integer)
Dim dec_len As Integer
Dim arabcode As String
Dim i As Integer
Dim examchar As Integer
dec_len = Len(dec_len) + 1
For i = 0 To dec_len - 1
    examchar = Mid(dec, dec_len - i, 1) + 1632
    arabcode = arabcode & ChrW(examchar)
Next
Dec2Arab = arabcode
End Function
 
Joined
Mar 8, 2017
Messages
4
Reaction score
1
well thanks for your help steve ... i used Becky's way i think its simpler ... thank you for ur suppot
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top