![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I wish to be able to enter numeric characters (eg: 567.00) into my database and have them converted to text for printing. I have a formula that only partially does this: 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- "; "Eigh-t "; "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; "") & If(Mod(Amount; 1) and Int(Amount);" & ";"") & If(Mod(Int(Amount*10); 10) = 1; Choose(Mod(Int(Amount*100); 10); "10 "; "11"; "12"; "13"; "14 "; "15"; "16 "; "17 "; "18 "; "19 "); Choose(Mod(Int(Amount*10); 10); ""; "1"; "2"; "3"; "4"; "5"; "6"; "7"; "8"; "9") & Choose(Mod(Int(Amount*100); 10); ""; "1 "; "2 "; "3 "; "4 "; "5 "; "6 "; "7"; "8 "; "9 ")) & Case(Mod(Amount ;1) > .01; "/100 - - - - - - - - - -"; Mod(Amount; 1) = .01; "/100 - - - - - -";"") It will convert correctly if the figure contains more than 0 cents, but not if it is only .00 Does anyone have a formula that will do this or know how I might alter this formula I have to replace ".00" with "No/100"? |
#3
| |||
| |||
|
|
I wish to be able to enter numeric characters (eg: 567.00) into my database and have them converted to text for printing. I have a formula that only partially does this: 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- "; "Eigh-t "; "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; "") & If(Mod(Amount; 1) and Int(Amount);" & ";"") & If(Mod(Int(Amount*10); 10) = 1; Choose(Mod(Int(Amount*100); 10); "10 "; "11"; "12"; "13"; "14 "; "15"; "16 "; "17 "; "18 "; "19 "); Choose(Mod(Int(Amount*10); 10); ""; "1"; "2"; "3"; "4"; "5"; "6"; "7"; "8"; "9") & Choose(Mod(Int(Amount*100); 10); ""; "1 "; "2 "; "3 "; "4 "; "5 "; "6 "; "7"; "8 "; "9 ")) & Case(Mod(Amount ;1) > .01; "/100 - - - - - - - - - -"; Mod(Amount; 1) = .01; "/100 - - - - - -";"") It will convert correctly if the figure contains more than 0 cents, but not if it is only .00 Does anyone have a formula that will do this or know how I might alter this formula I have to replace ".00" with "No/100"? |
#4
| |||
| |||
|
|
I wish to be able to enter numeric characters (eg: 567.00) into my database and have them converted to text for printing. I have a formula that only partially does this: 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- "; "Eigh-t "; "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; "") & If(Mod(Amount; 1) and Int(Amount);" & ";"") & If(Mod(Int(Amount*10); 10) = 1; Choose(Mod(Int(Amount*100); 10); "10 "; "11"; "12"; "13"; "14 "; "15"; "16 "; "17 "; "18 "; "19 "); Choose(Mod(Int(Amount*10); 10); ""; "1"; "2"; "3"; "4"; "5"; "6"; "7"; "8"; "9") & Choose(Mod(Int(Amount*100); 10); ""; "1 "; "2 "; "3 "; "4 "; "5 "; "6 "; "7"; "8 "; "9 ")) & Case(Mod(Amount ;1) > .01; "/100 - - - - - - - - - -"; Mod(Amount; 1) = .01; "/100 - - - - - -";"") It will convert correctly if the figure contains more than 0 cents, but not if it is only .00 Does anyone have a formula that will do this or know how I might alter this formula I have to replace ".00" with "No/100"? |
![]() |
| Thread Tools | |
| Display Modes | |
| |