Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Jul 2008
    Posts
    36
    Thanks
    4
    Thanked 0 Times in 0 Posts

    How can I find and select using <[٠-٩]@> a group of numbers in Arabic?

    Hi!,
    We find and select using <[0-9]@> a group of numbers in English.
    How can I find and select using <[٠-٩]@> a group of numbers in Arabic?
    Eg.: ٣٦٢

  2. #2
    WS Lounge VIP mrjimphelps's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    3,396
    Thanks
    445
    Thanked 404 Times in 376 Posts
    Sometimes the best way to search is to use the codes for the characters, rather than the characters themselves. All of the Arabic numbers and letters are part of the Unicode table, so you could search for the Unicode values rather than the characters; but in order for Excel to know that you mean the Arabic numbers, you will need to use the UNICHAR function to convert the code to the character.

    The code for each Arabic number can be found in the Symbol table. Click Insert then Symbol. The symbol table will appear. At the top right, select Arabic as the subset; at the bottom right, select Unicode (hex). Now scroll through the table till you find the desired characters. I believe you will find that they are Unicode 0660 to 0669.

    If you have Excel 2013 or later, there is a function called UNICHAR. So your search will look like this: [UNICHAR(0660) - UNICHAR(0669)]. By searching on UNICHAR(0660), you will be certain that it is searching for the Arabic '0', because the UNICHAR function will get the character from the symbol table. The search won't have to figure out what you want to search on; it will know, because UNICHAR will tell it what to search on.

    Using the codes rather than the letters is an excellent way to make sure that you will get upper-case or lower-case letters. For example, upper-case A is Unicode 0041, while lower-case a is Unicode 0061. If you put UNICHAR(0041), Excel knows that you mean upper-case A; there is no way for it to be confused. This is why I think you will be successful searching for the Arabic numbers if you use the Unicode codes, rather than the characters themselves, in your search.

  3. #3
    Lounger
    Join Date
    Jul 2008
    Posts
    36
    Thanks
    4
    Thanked 0 Times in 0 Posts
    I can find Arabic numbers one by one, using [٠-٩] and select wildcards box.
    I want to find and select a group of numbers in Arabic? But how?
    Last edited by yken; 2016-10-14 at 13:16.

  4. #4
    WS Lounge VIP mrjimphelps's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    3,396
    Thanks
    445
    Thanked 404 Times in 376 Posts
    When you are searching on characters, Excel might not allow a range. But when you search on numbers, apparently it does allow a range. My thought is that Excel doesn't recognize the Arabic numbers as numbers, so it isn't letting you do a range of these numbers.

    If you use the UNICHAR function, you are using the numbers in the Unicode table; that's why I am thinking that it will let you do a range if you do it that way.

    Perhaps it should be modified like this: [UNICHAR(0660-0669)].

    Back when I was a programmer, we would do stuff like this:

    for x = 0660 to 0669:
    If CurrentLetter = UNICHAR(x) then IsNumber = True

    In this way, you can run through a range of characters, from lowest to highest, because you are treating them as numbers rather than as letters.

    Also:
    for x = 0041 to 0056 => this would give all of the upper-case English letters, because these are the Unicode equivalent numbers of these letters.
    Last edited by mrjimphelps; 2016-10-14 at 13:24.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •