JohnZ1156
Board Regular
- Joined
- Apr 10, 2021
- Messages
- 180
- Office Version
- 2021
- Platform
- Windows
I have this formula to convert numbers to text, however, if I enter 12.56, it shows cents as "56/100 Dollars". I would like it to work just as it does except show "Twelve Dollars and Fifty Six Cents". Of course, if the amount was 12.01, it would have to check for one cent, and in that case show, "Twelve Dollars and One Cent".
Here is the formula that I have: (replace $C$3 in the formula with the location of your value)
=IF($C$3=0,"",CHOOSE(LEFT(TEXT($C$3,"000000000.00"))+1,,"One ","Two ","Three ","Four ","Five ","Six ","Seven ","Eight ","Nine ")
&IF(--LEFT(TEXT($C$3,"000000000.00"))=0,,IF(AND(--MID(TEXT($C$3,"000000000.00"),2,1)=0,--MID(TEXT($C$3,"000000000.00"),3,1)=0),"Hundred ","Hundred "))
&CHOOSE(MID(TEXT($C$3,"000000000.00"),2,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ")
&IF(--MID(TEXT($C$3,"000000000.00"),2,1)<>1,CHOOSE(MID(TEXT($C$3,"000000000.00"),3,1)+1,,"One ","Two ","Three ","Four ","Five ","Six ","Seven ","Eight ","Nine "),
CHOOSE(MID(TEXT($C$3,"000000000.00"),3,1)+1,"Ten ","Eleven ","Twelve ","Thirteen ","Fourteen ","Fifteen ","Sixteen ","Seventeen ","Eighteen ","Nineteen "))
&IF((--LEFT(TEXT($C$3,"000000000.00"))+MID(TEXT($C$3,"000000000.00"),2,1)+MID(TEXT($C$3,"000000000.00"),3,1))=0,,IF(AND((--MID(TEXT($C$3,"000000000.00"),4,1)+MID(TEXT($C$3,"000000000.00"),5,1)+MID(TEXT($C$3,"000000000.00"),6,1)+MID(TEXT($C$3,"000000000.00"),7,1))=0,(--MID(TEXT($C$3,"000000000.00"),8,1)+RIGHT(TEXT($C$3,"000000000.00")))>0),"Million ","Million "))
&CHOOSE(MID(TEXT($C$3,"000000000.00"),4,1)+1,,"One ","Two ","Three ","Four ","Five ","Six ","Seven ","Eight ","Nine ")
&IF(--MID(TEXT($C$3,"000000000.00"),4,1)=0,,IF(AND(--MID(TEXT($C$3,"000000000.00"),5,1)=0,--MID(TEXT($C$3,"000000000.00"),6,1)=0),"Hundred ","Hundred "))
&CHOOSE(MID(TEXT($C$3,"000000000.00"),5,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ")
&IF(--MID(TEXT($C$3,"000000000.00"),5,1)<>1,CHOOSE(MID(TEXT($C$3,"000000000.00"),6,1)+1,,"One ","Two ","Three ","Four ","Five ","Six ","Seven ","Eight ","Nine "),CHOOSE(MID(TEXT($C$3,"000000000.00"),6,1)+1,"Ten ","Eleven ","Twelve ","Thirteen ","Fourteen ","Fifteen ","Sixteen ","Seventeen ","Eighteen ","Nineteen "))
&IF((--MID(TEXT($C$3,"000000000.00"),4,1)+MID(TEXT($C$3,"000000000.00"),5,1)+MID(TEXT($C$3,"000000000.00"),6,1))=0,,IF(OR((--MID(TEXT($C$3,"000000000.00"),7,1)+MID(TEXT($C$3,"000000000.00"),8,1)+MID(TEXT($C$3,"000000000.00"),9,1))=0,--MID(TEXT($C$3,"000000000.00"),7,1)<>0),"Thousand ","Thousand "))
&CHOOSE(MID(TEXT($C$3,"000000000.00"),7,1)+1,,"One ","Two ","Three ","Four ","Five ","Six ","Seven ","Eight ","Nine ")
&IF(--MID(TEXT($C$3,"000000000.00"),7,1)=0,,IF(AND(--MID(TEXT($C$3,"000000000.00"),8,1)=0,--MID(TEXT($C$3,"000000000.00"),9,1)=0),"Hundred ","Hundred "))&
CHOOSE(MID(TEXT($C$3,"000000000.00"),8,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ")
&IF(--MID(TEXT($C$3,"000000000.00"),8,1)<>1,CHOOSE(MID(TEXT($C$3,"000000000.00"),9,1)+1,,"One ","Two ","Three ","Four ","Five ","Six ","Seven ","Eight ","Nine "),CHOOSE(MID(TEXT($C$3,"000000000.00"),9,1)+1,"Ten ","Eleven ","Twelve ","Thirteen ","Fourteen ","Fifteen ","Sixteen ","Seventeen ","Eighteen ","Nineteen "))
&"and "&RIGHT(TEXT($C$3,"000000000.00"),2)&"/100")&" Dollars"
Here is the formula that I have: (replace $C$3 in the formula with the location of your value)
=IF($C$3=0,"",CHOOSE(LEFT(TEXT($C$3,"000000000.00"))+1,,"One ","Two ","Three ","Four ","Five ","Six ","Seven ","Eight ","Nine ")
&IF(--LEFT(TEXT($C$3,"000000000.00"))=0,,IF(AND(--MID(TEXT($C$3,"000000000.00"),2,1)=0,--MID(TEXT($C$3,"000000000.00"),3,1)=0),"Hundred ","Hundred "))
&CHOOSE(MID(TEXT($C$3,"000000000.00"),2,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ")
&IF(--MID(TEXT($C$3,"000000000.00"),2,1)<>1,CHOOSE(MID(TEXT($C$3,"000000000.00"),3,1)+1,,"One ","Two ","Three ","Four ","Five ","Six ","Seven ","Eight ","Nine "),
CHOOSE(MID(TEXT($C$3,"000000000.00"),3,1)+1,"Ten ","Eleven ","Twelve ","Thirteen ","Fourteen ","Fifteen ","Sixteen ","Seventeen ","Eighteen ","Nineteen "))
&IF((--LEFT(TEXT($C$3,"000000000.00"))+MID(TEXT($C$3,"000000000.00"),2,1)+MID(TEXT($C$3,"000000000.00"),3,1))=0,,IF(AND((--MID(TEXT($C$3,"000000000.00"),4,1)+MID(TEXT($C$3,"000000000.00"),5,1)+MID(TEXT($C$3,"000000000.00"),6,1)+MID(TEXT($C$3,"000000000.00"),7,1))=0,(--MID(TEXT($C$3,"000000000.00"),8,1)+RIGHT(TEXT($C$3,"000000000.00")))>0),"Million ","Million "))
&CHOOSE(MID(TEXT($C$3,"000000000.00"),4,1)+1,,"One ","Two ","Three ","Four ","Five ","Six ","Seven ","Eight ","Nine ")
&IF(--MID(TEXT($C$3,"000000000.00"),4,1)=0,,IF(AND(--MID(TEXT($C$3,"000000000.00"),5,1)=0,--MID(TEXT($C$3,"000000000.00"),6,1)=0),"Hundred ","Hundred "))
&CHOOSE(MID(TEXT($C$3,"000000000.00"),5,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ")
&IF(--MID(TEXT($C$3,"000000000.00"),5,1)<>1,CHOOSE(MID(TEXT($C$3,"000000000.00"),6,1)+1,,"One ","Two ","Three ","Four ","Five ","Six ","Seven ","Eight ","Nine "),CHOOSE(MID(TEXT($C$3,"000000000.00"),6,1)+1,"Ten ","Eleven ","Twelve ","Thirteen ","Fourteen ","Fifteen ","Sixteen ","Seventeen ","Eighteen ","Nineteen "))
&IF((--MID(TEXT($C$3,"000000000.00"),4,1)+MID(TEXT($C$3,"000000000.00"),5,1)+MID(TEXT($C$3,"000000000.00"),6,1))=0,,IF(OR((--MID(TEXT($C$3,"000000000.00"),7,1)+MID(TEXT($C$3,"000000000.00"),8,1)+MID(TEXT($C$3,"000000000.00"),9,1))=0,--MID(TEXT($C$3,"000000000.00"),7,1)<>0),"Thousand ","Thousand "))
&CHOOSE(MID(TEXT($C$3,"000000000.00"),7,1)+1,,"One ","Two ","Three ","Four ","Five ","Six ","Seven ","Eight ","Nine ")
&IF(--MID(TEXT($C$3,"000000000.00"),7,1)=0,,IF(AND(--MID(TEXT($C$3,"000000000.00"),8,1)=0,--MID(TEXT($C$3,"000000000.00"),9,1)=0),"Hundred ","Hundred "))&
CHOOSE(MID(TEXT($C$3,"000000000.00"),8,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ")
&IF(--MID(TEXT($C$3,"000000000.00"),8,1)<>1,CHOOSE(MID(TEXT($C$3,"000000000.00"),9,1)+1,,"One ","Two ","Three ","Four ","Five ","Six ","Seven ","Eight ","Nine "),CHOOSE(MID(TEXT($C$3,"000000000.00"),9,1)+1,"Ten ","Eleven ","Twelve ","Thirteen ","Fourteen ","Fifteen ","Sixteen ","Seventeen ","Eighteen ","Nineteen "))
&"and "&RIGHT(TEXT($C$3,"000000000.00"),2)&"/100")&" Dollars"