Arabic Numbers

Discussion in 'Excel' started by robero, Mar 8, 2017.

  1. robero

    robero

    Joined:
    Mar 8, 2017
    Messages:
    4
    Likes Received:
    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
     
    robero, Mar 8, 2017
    #1
    1. Advertisements

  2. robero

    Becky Administrator

    Joined:
    Aug 3, 2011
    Messages:
    42
    Likes Received:
    4
    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?
     
    Becky, Mar 9, 2017
    #2
    1. Advertisements

  3. robero

    Steve from Texas

    Joined:
    Mar 9, 2017
    Messages:
    5
    Likes Received:
    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...
     
    Steve from Texas, Mar 9, 2017
    #3
    robero likes this.
  4. robero

    robero

    Joined:
    Mar 8, 2017
    Messages:
    4
    Likes Received:
    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 ...
     
    robero, Mar 10, 2017
    #4
  5. robero

    Becky Administrator

    Joined:
    Aug 3, 2011
    Messages:
    42
    Likes Received:
    4
    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 :)
     
    Becky, Mar 10, 2017
    #5
    robero likes this.
  6. robero

    robero

    Joined:
    Mar 8, 2017
    Messages:
    4
    Likes Received:
    1
    wow ... this is perfect ... thanks alot ... works perfectly great ... much appreciated :)
     
    robero, Mar 10, 2017
    #6
    Becky likes this.
  7. robero

    Steve from Texas

    Joined:
    Mar 9, 2017
    Messages:
    5
    Likes Received:
    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
     
    Steve from Texas, Mar 10, 2017
    #7
  8. robero

    robero

    Joined:
    Mar 8, 2017
    Messages:
    4
    Likes Received:
    1
    well thanks for your help steve ... i used Becky's way i think its simpler ... thank you for ur suppot
     
    robero, Mar 10, 2017
    #8
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. qadude
    Replies:
    1
    Views:
    692
    XLPadawan
    Jun 14, 2016
  2. Maithem

    Arabic numbers

    Maithem, Feb 5, 2012, in forum: Excel
    Replies:
    0
    Views:
    481
    Maithem
    Feb 5, 2012
Loading...