English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

number is currency(123) convert it into one hundred twenty three

2006-07-09 04:38:10 · 3 answers · asked by sweety77 1 in Computers & Internet Programming & Design

3 answers

There is no function in Excel to do this, but if you send me (raodilip@yahoo.com) your E-mail address, I could send you a program to do it

2006-07-09 05:32:37 · answer #1 · answered by Dilip Rao 3 · 0 1

First, build a list of "words" that correspond to digits:
1=one, 2=two, up to 9=nine.
Use the length of the string of numbers to help isolate the number and to figure out what the units are (hundred, thousand, etc.) In your example, the number is three digits long, so the first position is hundreds. Isolate it by dividing by 100. Pick the correct "word" (in this case it is "one") then add " hundred" since it is in the third place. Now subtract out the 100 (you could use the modulo operation to get the remainder instead) and repeat.
The only funky part is at this point, since the "tens" place has its own set of words (twenty, thirty, etc) and the teens are funky, too (eleven, twelve, thirteen, etc.)

You could also start from the low end (ones) by using the modulo operation to get the remainders when diving by ten each time. But again, the numbers below 100, and especially the teens, need to be handled as special cases.

2006-07-09 05:59:38 · answer #2 · answered by DadOnline 6 · 0 0

kinda easy.

for i in 10-0(or any other number, depending on how big your number can get):
x=num/10^i
string+=ascii of 0 + x
num=num%10^i

that should work

2006-07-09 05:01:30 · answer #3 · answered by iammisc 5 · 0 0

fedest.com, questions and answers