Formula for spelling out text from numbers for a Chequebook

DRSteele

Well-known Member
Joined
Mar 31, 2015
Messages
2,654
Office Version
  1. 365
Platform
  1. Windows
Can someone please help me?

I trolled around the internets and found this formula, this bulky and complex monstrosity of a formula. It is certainly a wonder to behold! No disrespect meant to the author, but golly!

I wonder if we can create a better formula, perhaps one using some of the new functions available in 365. It should spell out the numbers into text, the most common purpose being creation of cheques that I can print in batch.


Cell Formulas
RangeFormula
C27C27=MOD(B27,1)*100
B28B28=CHOOSE(LEFT(TEXT(B27,"000000000.00"))+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine")&IF(--LEFT(TEXT(B27,"000000000.00"))=0,,IF(AND(--MID(TEXT(B27,"000000000.00"),2,1)=0,--MID(TEXT(B27,"000000000.00"),3,1)=0)," Hundred"," Hundred and "))&CHOOSE(MID(TEXT(B27,"000000000.00"),2,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ")&IF(--MID(TEXT(B27,"000000000.00"),2,1)<>1,CHOOSE(MID(TEXT(B27,"000000000.00"),3,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"),CHOOSE(MID(TEXT(B27,"000000000.00"),3,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"))&IF((--LEFT(TEXT(B27,"000000000.00"))+MID(TEXT(B27,"000000000.00"),2,1)+MID(TEXT(B27,"000000000.00"),3,1))=0,,IF(AND((--MID(TEXT(B27,"000000000.00"),4,1)+MID(TEXT(B27,"000000000.00"),5,1)+MID(TEXT(B27,"000000000.00"),6,1)+MID(TEXT(B27,"000000000.00"),7,1))=0,(--MID(TEXT(B27,"000000000.00"),8,1)+RIGHT(TEXT(B27,"000000000.00")))>0)," Million and "," Million "))&CHOOSE(MID(TEXT(B27,"000000000.00"),4,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine")&IF(--MID(TEXT(B27,"000000000.00"),4,1)=0,,IF(AND(--MID(TEXT(B27,"000000000.00"),5,1)=0,--MID(TEXT(B27,"000000000.00"),6,1)=0)," Hundred"," Hundred and"))&CHOOSE(MID(TEXT(B27,"000000000.00"),5,1)+1,,," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety")&IF(--MID(TEXT(B27,"000000000.00"),5,1)<>1,CHOOSE(MID(TEXT(B27,"000000000.00"),6,1)+1,," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"),CHOOSE(MID(TEXT(B27,"000000000.00"),6,1)+1," Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen"))&IF((--MID(TEXT(B27,"000000000.00"),4,1)+MID(TEXT(B27,"000000000.00"),5,1)+MID(TEXT(B27,"000000000.00"),6,1))=0,,IF(OR((--MID(TEXT(B27,"000000000.00"),7,1)+MID(TEXT(B27,"000000000.00"),8,1)+MID(TEXT(B27,"000000000.00"),9,1))=0,--MID(TEXT(B27,"000000000.00"),7,1)<>0)," Thousand "," Thousand and "))&CHOOSE(MID(TEXT(B27,"000000000.00"),7,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine")&IF(--MID(TEXT(B27,"000000000.00"),7,1)=0,,IF(AND(--MID(TEXT(B27,"000000000.00"),8,1)=0,--MID(TEXT(B27,"000000000.00"),9,1)=0)," Hundred "," Hundred and "))&CHOOSE(MID(TEXT(B27,"000000000.00"),8,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ")&IF(--MID(TEXT(B27,"000000000.00"),8,1)<>1,CHOOSE(MID(TEXT(B27,"000000000.00"),9,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"),CHOOSE(MID(TEXT(B27,"000000000.00"),9,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"))
B29B29=CHOOSE(LEFT(TEXT(B27,"000000000.00"))+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine")&IF(--LEFT(TEXT(B27,"000000000.00"))=0,,IF(AND(--MID(TEXT(B27,"000000000.00"),2,1)=0,--MID(TEXT(B27,"000000000.00"),3,1)=0)," Hundred"," Hundred "))&CHOOSE(MID(TEXT(B27,"000000000.00"),2,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ")&IF(--MID(TEXT(B27,"000000000.00"),2,1)<>1,CHOOSE(MID(TEXT(B27,"000000000.00"),3,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"),CHOOSE(MID(TEXT(B27,"000000000.00"),3,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"))&IF((--LEFT(TEXT(B27,"000000000.00"))+MID(TEXT(B27,"000000000.00"),2,1)+MID(TEXT(B27,"000000000.00"),3,1))=0,,IF(AND((--MID(TEXT(B27,"000000000.00"),4,1)+MID(TEXT(B27,"000000000.00"),5,1)+MID(TEXT(B27,"000000000.00"),6,1)+MID(TEXT(B27,"000000000.00"),7,1))=0,(--MID(TEXT(B27,"000000000.00"),8,1)+RIGHT(TEXT(B27,"000000000.00")))>0)," Million "," Million "))&CHOOSE(MID(TEXT(B27,"000000000.00"),4,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine")&IF(--MID(TEXT(B27,"000000000.00"),4,1)=0,,IF(AND(--MID(TEXT(B27,"000000000.00"),5,1)=0,--MID(TEXT(B27,"000000000.00"),6,1)=0)," Hundred"," Hundred"))&CHOOSE(MID(TEXT(B27,"000000000.00"),5,1)+1,,," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety")&IF(--MID(TEXT(B27,"000000000.00"),5,1)<>1,CHOOSE(MID(TEXT(B27,"000000000.00"),6,1)+1,," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"),CHOOSE(MID(TEXT(B27,"000000000.00"),6,1)+1," Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen"))&IF((--MID(TEXT(B27,"000000000.00"),4,1)+MID(TEXT(B27,"000000000.00"),5,1)+MID(TEXT(B27,"000000000.00"),6,1))=0,,IF(OR((--MID(TEXT(B27,"000000000.00"),7,1)+MID(TEXT(B27,"000000000.00"),8,1)+MID(TEXT(B27,"000000000.00"),9,1))=0,--MID(TEXT(B27,"000000000.00"),7,1)<>0)," Thousand "," Thousand "))&CHOOSE(MID(TEXT(B27,"000000000.00"),7,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine")&IF(--MID(TEXT(B27,"000000000.00"),7,1)=0,,IF(AND(--MID(TEXT(B27,"000000000.00"),8,1)=0,--MID(TEXT(B27,"000000000.00"),9,1)=0)," Hundred "," Hundred "))&CHOOSE(MID(TEXT(B27,"000000000.00"),8,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ")&IF(--MID(TEXT(B27,"000000000.00"),8,1)<>1,CHOOSE(MID(TEXT(B27,"000000000.00"),9,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"),CHOOSE(MID(TEXT(B27,"000000000.00"),9,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"))
 
Last edited:

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
If you use mailmerge via Word, you don't need a formula, since it can be done with a simple field code switch. See Mailmerge Number & Currency Formatting in the Mailmerge Tips & Tricks thread at: Mailmerge Tips & Tricks
 
Upvote 0
If you use mailmerge via Word, you don't need a formula, since it can be done with a simple field code switch. See Mailmerge Number & Currency Formatting in the Mailmerge Tips & Tricks thread at: Mailmerge Tips & Tricks
Thanks for including the suggestion. But I need a formula within Excel.
 
Upvote 0

Forum statistics

Threads
1,223,891
Messages
6,175,229
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top