# Numer to Text (FM supplied calculation)

Question asked by DrWill on Jun 18, 2010
Latest reply on Jun 18, 2010 by philmodjunk

### Title

Numer to Text (FM supplied calculation)

### Post

Hi,

I am trying to use the Converting Number to Text calculation supplied in the FM help. I am using FM 11 Pro.

When I paste the formula into the calc field I get an error, “ A number, text constant, field name or “(“ is expected here." and references me to the first line in the calcu. I highlight it in red below.

What I am trying to do is convert a number (\$100,016.50 or simliar) to "One Hundred Thousand, Sixteen Dollars and Fifty Cents"

Any help would be greatly appreciated!

Thanks

Dave

Here's the full calculation for reference.

Choose(Int(Mod(Loan 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(Loan Amount,10^11) / 10^10) = 1,  Choose(Int(Mod(Loan Amount,10^10) / 10^9), Ten , Eleven , Twelve , Thirteen , Fourteen , Fifteen , Sixteen , Seventeen , Eighteen , Nineteen ),  Choose(Int(Mod(Loan Amount,10^11) / 10^10), , , Twenty , Thirty , Forty , Fifty , Sixty , Seventy , Eighty , Ninety ) &  Choose(Int(Mod(Loan Amount,10^10) / 10^9), , One , Two , Three , Four , Five , Six , Seven , Eight , Nine )) &  Case(Int(Mod(Loan Amount,10^12)/10^9) and Int(Mod(Loan Amount,10^9) / 10^3), Billion, , Int(Mod(Loan Amount,10^12)/10^9),Billion ,)  &  Choose(Int(Mod(Loan 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(Loan Amount,10^8) / 10^7) = 1,  Choose(Int(Mod(Loan Amount,10^7) / 10^6), Ten , Eleven , Twelve , Thirteen , Fourteen , Fifteen , Sixteen , Seventeen , Eighteen , Nineteen ),  Choose(Int(Mod(Loan Amount,10^8) / 10^7), , , Twenty , Thirty , Forty , Fifty , Sixty , Seventy , Eighty , Ninety ) &  Choose(Int(Mod(Loan Amount,10^7) / 10^6), , One , Two , Three , Four , Five , Six , Seven , Eight , Nine )) &  Case(Int(Mod(Loan Amount,10^9)/10^6) and Int(Mod(Loan Amount,10^6) / 10^3), Million, , Int(Mod(Loan Amount,10^9)/10^6),Million ,)  &  Choose(Int(Mod(Loan 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(Loan Amount,10^5) / 10^4) = 1,  Choose(Int(Mod(Loan Amount,10^4) / 10^3), Ten , Eleven , Twelve , Thirteen , Fourteen , Fifteen , Sixteen , Seventeen , Eighteen , Nineteen ),  Choose(Int(Mod(Loan Amount,10^5) / 10^4), , , Twenty , Thirty , Forty , Fifty , Sixty , Seventy , Eighty , Ninety ) &  Choose(Int(Mod(Loan Amount,10^4) / 10^3), , One , Two , Three , Four , Five , Six , Seven , Eight , Nine )) &  Case(Int(Mod(Loan Amount,10^6)/10^3) and Int(Mod(Loan Amount,10^3) / 10^0), Thousand, , Int(Mod(Loan Amount,10^6)/10^3),Thousand ,)  &  Choose(Int(Mod(Loan 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(Loan Amount,100) / 10) = 1,  Choose(Int(Mod(Loan Amount,10)), Ten , Eleven , Twelve , Thirteen , Fourteen , Fifteen , Sixteen , Seventeen , Eighteen , Nineteen ),  Choose(Int(Mod(Loan Amount,100) / 10), , , Twenty , Thirty , Forty , Fifty , Sixty , Seventy , Eighty , Ninety ) &  Choose(Int(Mod(Loan Amount,10)), , One , Two , Three , Four , Five , Six , Seven , Eight , Nine )) & Case(Int(Loan Amount) > 1, Dollars, Int(Loan Amount) = 1, Dollar, )  &  If(Mod(Loan Amount, 1) and Int(Loan Amount), and ,) &  If(Mod(Int(Loan Amount*10), 10) = 1,  Choose(Mod(Int(Loan Amount*100), 10), Ten , Eleven , Twelve , Thirteen , Fourteen , Fifteen , Sixteen , Seventeen , Eighteen , Nineteen ),  Choose(Mod(Int(Loan Amount*10), 10), , , Twenty , Thirty , Forty , Fifty , Sixty , Seventy , Eighty , Ninety ) &  Choose(Mod(Int(Loan Amount*100), 10), , One , Two , Three , Four , Five , Six , Seven , Eight , Nine )) &  Case(Mod(Loan Amount, 1) > .01, cents, Mod(Loan Amount, 1) = .01, cent,)