View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default Formatting numerals and text numbers between Arabic and Hindi (indic) languages

I think you will need to split the two values before and after the hyphen
then format separately and recombine as a text string like.......
(this format a string like 123-140 to $123.00-$140.00 - not sure what
formatting you need for local language, HTH?

=CONCATENATE(DOLLAR(LEFT(A1,FIND("-",A1,1)-1),2),"-",DOLLAR(MID(A1,FIND("-",A1,1)+1,LEN(A1)-FIND("-",A1,1)),2))
--
Cheers
Nigel



wrote in message
oups.com...
Hi

I am trying to format some cells which contain numbers and numbers
stored as text to another language (Arabic language). So I have to
format the Arabic numbers to what is called Hindi or Indic numbers
(that which is used in Arabic language).

To give an example of what I want:

A B
1 400 =A1 (but formatted as Hindi or Indic numeral
using "[$-2000000]0.00"
2 15-12-2006 =A2 (but formatted as Hindi or Indic numeral
"[$-2000000]dd-mm-yyyy"
3 161-12 =A3 (formatting do not work here - "[$-2000000]@"

The formatting of B1 and B2 are done using the following VBA code.

Sheet1.Range("B1").NumberFormat = "[$-2000000]0.00"
Sheet1.Range("B2").NumberFormat = "[$-2000000]dd-mm-yyyy"

The above works fine shows the data in B1 and B2 as Hindi/Indic
numerals because A1 is formatted as number A2 is formatted as Date.

Now if A3 is formatted as text and the A3 data is 161-12 Then B3
formatted using the following code

Sheet1.Range("B3").NumberFormat = "[$-2000000]@"

do not work. The numbers are displayed as Arabic numbers only.

Is there a way numbers separated by a hyphen (-) like 150-140 can be
formatted Hindi Indic numerals?

Any help will be appreciated.

Thank you.