2 Replies Latest reply on Sep 23, 2013 9:21 AM by jmaldonado

# Números a Letras!

Cómo puedo hacer un guión que me escriba un número en letras? lo voy a utilizar para escribir la cantidad en un cheque.!!

Gracias!!

• ###### 1. Re: Números a Letras!

You can create a calculation that spells it out for you.  If you have a field named "amount", the following calculation will work in English and maybe you can modify it accordingly:

"****" & Choose(Int(Mod(amount;10^12) / 10^11); ""; "One Hundred "; "Two

Hundred "; "Three Hundred "; "Four Hundred "; "Five Hundred "; "Six

Hundred "; "Seven Hundred "; "Eight Hundred "; "Nine Hundred ")

&

If(Int(Mod(amount;10^11) / 10^10) = 1;

Choose(Int(Mod(amount;10^10) / 10^9); "Ten "; "Eleven "; "Twelve

"; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen ";

"Eighteen "; "Nineteen ");

Choose(Int(Mod(amount;10^11) / 10^10); ""; ""; "Twenty ";

"Thirty "; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty ";

"Ninety ")

&

Choose(Int(Mod(amount;10^10) / 10^9); ""; "One "; "Two "; "Three

"; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine "))

&

Case(Int(Mod(amount;10^12)/10^9) and Int(Mod(amount;10^9) /

10^3); "Billion, "; Int(Mod(amount;10^12)/10^9);"Billion ";"")

&

Choose(Int(Mod(amount;10^9) / 10^8); ""; "One Hundred "; "Two

Hundred "; "Three Hundred "; "Four Hundred "; "Five Hundred "; "Six

Hundred "; "Seven Hundred "; "Eight Hundred "; "Nine Hundred ")

&

If(Int(Mod(amount;10^8) / 10^7) = 1;

Choose(Int(Mod(amount;10^7) / 10^6); "Ten "; "Eleven "; "Twelve

"; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen ";

"Eighteen "; "Nineteen ");

Choose(Int(Mod(amount;10^8) / 10^7); ""; ""; "Twenty "; "Thirty

"; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ")

&

Choose(Int(Mod(amount;10^7) / 10^6); ""; "One "; "Two "; "Three

"; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine "))

&

Case(Int(Mod(amount;10^9)/10^6) and Int(Mod(amount;10^6) /

10^3); "Million, "; Int(Mod(amount;10^9)/10^6);"Million ";"")

&

Choose(Int(Mod(amount;10^6) / 10^5); ""; "One Hundred "; "Two

Hundred "; "Three Hundred "; "Four Hundred "; "Five Hundred "; "Six

Hundred "; "Seven Hundred "; "Eight Hundred "; "Nine Hundred ")

&

If(Int(Mod(amount;10^5) / 10^4) = 1;

Choose(Int(Mod(amount;10^4) / 10^3); "Ten "; "Eleven "; "Twelve

"; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen ";

"Eighteen "; "Nineteen ");

Choose(Int(Mod(amount;10^5) / 10^4); ""; ""; "Twenty "; "Thirty

"; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ")

&

Choose(Int(Mod(amount;10^4) / 10^3); ""; "One "; "Two "; "Three

"; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine "))

&

Case(Int(Mod(amount;10^6)/10^3) and Int(Mod(amount;10^3) /

10^0); "Thousand, "; Int(Mod(amount;10^6)/10^3);"Thousand ";"")

&

Choose(Int(Mod(amount;10^3) / 100); ""; "One Hundred "; "Two

Hundred "; "Three Hundred "; "Four Hundred "; "Five Hundred "; "Six

Hundred "; "Seven Hundred "; "Eight Hundred "; "Nine Hundred ")

&

If(Int(Mod(amount;100) / 10) = 1;

Choose(Int(Mod(amount;10)); "Ten "; "Eleven "; "Twelve ";

"Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen ";

"Eighteen "; "Nineteen ");

Choose(Int(Mod(amount;100) / 10); ""; ""; "Twenty "; "Thirty ";

"Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ") &

Choose(Int(Mod(amount;10)); ""; "One "; "Two "; "Three "; "Four

"; "Five "; "Six "; "Seven "; "Eight "; "Nine ")) &

Case(Int(amount) > 1; "Dollars"; Int(amount) = 1; "Dollar";

"")

&

If(Mod(amount; 1) and Int(amount);" and ";"")

&

If(Mod(Int(amount*10); 10) = 1;

Choose(Mod(Int(amount*100); 10); "Ten "; "Eleven "; "Twelve ";

"Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen ";

"Eighteen "; "Nineteen ");

Choose(Mod(Int(amount*10); 10); ""; ""; "Twenty "; "Thirty ";

"Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ")

&

Choose(Mod(Int(amount*100); 10); ""; "One "; "Two "; "Three ";

"Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine ")) &

Case(Mod(amount; 1) > .01; "cents"; Mod(amount; 1) = .01; "cent";"") & "****"

• ###### 2. Re: Números a Letras!

Gracias Taylor !!!

Voy a intentar hacerlo hoy!! y en cuanto me funcione te cuento!!