Hi to all
I am trying to build a formula that will look for a vowel in a string in the same cell and when found I want to change all its instances to another vowel then I want to double the consonant before each instance of this vowel. This is mainly to deal with Diacritics of Arabic text.
Arabic Vowels: ---------------UNICODE:
Example in B12: I have this sentence:
[size=+8]مَدَّ الظِّلَّ مَدّا[/size]
(mada athela madan) meaning "He streched the shade." [th] in arabic is one sound
Using the following formula:
=SUBSTITUTE($B$12,MID($B$12,SEARCH(shada,$B$12),1),sukoun&REPT(MID($B$12,SEARCH(shada,$B$12)-1,1),1))
I want each shada (the 3 like shape to be replaced with sukoun (the little o) and every main letter bellow it to be doubled so that I get the following output:
[size=+4]
مَدْدَ
الظْظِلْلَ
مَدْدا
[/size]
This is basically like decompressing a stressed letter to its two main sounds like [size=+3]دّ[/size] to [size=+3]دْد[/size] or [size=+3]ظِّ[/size] to [size=+3]ظْظِ[/size] or [size=+3]لَّ[/size] to [size=+3]لْلَ[/size]
So far with the formula above this is the output I am getting
[size=+4]
مَدْدَ الظْدِلْدَ مَدْدا
[/size]
As you can notice only the first instance of the shada is substituted to sukun ie no vowel and only the character before it gets doubled and gets carried to the following shada positions in the following words.
In the formula above I used the following named ranges.
I would be very grateful if someone could shed some light on this problem either in a formula form or user defined function and thanks to you all in advance.
I am trying to build a formula that will look for a vowel in a string in the same cell and when found I want to change all its instances to another vowel then I want to double the consonant before each instance of this vowel. This is mainly to deal with Diacritics of Arabic text.
Arabic Vowels: ---------------UNICODE:
- shada [size=+4]ّ[/size] ---------------- 1617----------------stressed, like "stress on p in problem"
- sukoun [size=+3] ْ [/size] ------------ 1618 ---------------- no vowel
- fatha [size=+3]َ [/size] ---------------- 1614 ---------------- a
- kasra [size=+3]ِ [/size] ---------------- 1616 ---------------- i
- dama [size=+3]ُ [/size] ---------------- 1615---------------- o
Example in B12: I have this sentence:
[size=+8]مَدَّ الظِّلَّ مَدّا[/size]
(mada athela madan) meaning "He streched the shade." [th] in arabic is one sound
Using the following formula:
=SUBSTITUTE($B$12,MID($B$12,SEARCH(shada,$B$12),1),sukoun&REPT(MID($B$12,SEARCH(shada,$B$12)-1,1),1))
I want each shada (the 3 like shape to be replaced with sukoun (the little o) and every main letter bellow it to be doubled so that I get the following output:
[size=+4]
مَدْدَ
الظْظِلْلَ
مَدْدا
[/size]
This is basically like decompressing a stressed letter to its two main sounds like [size=+3]دّ[/size] to [size=+3]دْد[/size] or [size=+3]ظِّ[/size] to [size=+3]ظْظِ[/size] or [size=+3]لَّ[/size] to [size=+3]لْلَ[/size]
So far with the formula above this is the output I am getting
[size=+4]
مَدْدَ الظْدِلْدَ مَدْدا
[/size]
As you can notice only the first instance of the shada is substituted to sukun ie no vowel and only the character before it gets doubled and gets carried to the following shada positions in the following words.
In the formula above I used the following named ranges.
- C2 named shada FORMULA =UNICHAR(1617)
- D2 named sukoun FORMULA =UNICHAR(1618)
- E2 named fatha FORMULA =UNICHAR(1614)
- F2 named kasra FORMULA =UNICHAR(1616)
- G2 named dama FORMULA =UNICHAR(1615)
I would be very grateful if someone could shed some light on this problem either in a formula form or user defined function and thanks to you all in advance.