Example:
value | desired output |
---|---|
300 | Three Hundred |
300.50 | Three Hundred and 50 cents |
I can't find a way to do this in Google Sheets, and I am not savvy enough to build anything.
This website https://www.excelforum.com/tips-and-tutorials/1015010-convert-a-numeric-value-to-words-without-vba.html
Does show an Excel formula that can do this. I just tested in Google Sheets and this also works.
The formula is
=IF(OR(LEN(FLOOR(E3,1))>=13,FLOOR(E3,1)<=0),"Out of range",PROPER(SUBSTITUTE(CONCATENATE(CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),1,1)+1,"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six hundred ","seven hundred ","eight hundred ","nine hundred "),CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),2,1)+1,"",CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),3,1)+1,"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"),IF(VALUE(MID(TEXT(INT(E3),REPT(0,12)),2,1))>1,CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),3,1)+1,"","-one","-two","-three","-four","-five","-six","-seven","-eight","-nine"),IF(VALUE(MID(TEXT(INT(E3),REPT(0,12)),2,1))=0,CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),3,1)+1,"","one","two","three","four","five","six","seven","eight","nine"),"")),IF(E3>=10^9," billion ",""),CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),4,1)+1,"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six hundred ","seven hundred ","eight hundred ","nine hundred "),CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),5,1)+1,"",CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),6,1)+1,"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"),IF(VALUE(MID(TEXT(INT(E3),REPT(0,12)),5,1))>1,CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),6,1)+1,"","-one","-two","-three","-four","-five","-six","-seven","-eight","-nine"),IF(VALUE(MID(TEXT(INT(E3),REPT(0,12)),5,1))=0,CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),6,1)+1,"","one","two","three","four","five","six","seven","eight","nine"),"")),IF(VALUE(MID(TEXT(INT(E3),REPT(0,12)),4,3))>0," million ",""),CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),7,1)+1,"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six hundred ","seven hundred ","eight hundred ","nine hundred "),CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),8,1)+1,"",CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),9,1)+1,"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"),IF(VALUE(MID(TEXT(INT(E3),REPT(0,12)),8,1))>1,CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),9,1)+1,"","-one","-two","-three","-four","-five","-six","-seven","-eight","-nine"),IF(VALUE(MID(TEXT(INT(E3),REPT(0,12)),8,1))=0,CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),9,1)+1,"","one","two","three","four","five","six","seven","eight","nine"),"")),IF(VALUE(MID(TEXT(INT(E3),REPT(0,12)),7,3))," thousand ",""),CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),10,1)+1,"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six hundred ","seven hundred ","eight hundred ","nine hundred "),CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),11,1)+1,"",CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),12,1)+1,"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"),IF(VALUE(MID(TEXT(INT(E3),REPT(0,12)),11,1))>1,CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),12,1)+1,"","-one","-two","-three","-four","-five","-six","-seven","-eight","-nine"),IF(VALUE(MID(TEXT(INT(E3),REPT(0,12)),11,1))=0,CHOOSE(MID(TEXT(INT(E3),REPT(0,12)),12,1)+1,"","one","two","three","four","five","six","seven","eight","nine"),"")))," "," ")&IF(FLOOR(E3,1)>1," dollars"," dollar")))
little tweaks here and there of dominic's answer to suit your needs exactly as you desire:
=REGEXREPLACE(IF(OR(LEN(FLOOR(A1,1))>=13,FLOOR(A1,1)<=0),"Out of range",
PROPER(SUBSTITUTE(CONCATENATE(CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),1,1)+1,"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six hundred ","seven hundred ","eight hundred ","nine hundred "),
CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),2,1)+1,"",CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),3,1)+1,"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"),
IF(VALUE(MID(TEXT(INT(A1),
REPT(0,12)),2,1))>1,CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),3,1)+1,"","-one","-two","-three","-four","-five","-six","-seven","-eight","-nine"),
IF(VALUE(MID(TEXT(INT(A1),
REPT(0,12)),2,1))=0,CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),3,1)+1,"","one","two","three","four","five","six","seven","eight","nine"),"")),
IF(A1>=10^9," billion ",""),
CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),4,1)+1,"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six hundred ","seven hundred ","eight hundred ","nine hundred "),
CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),5,1)+1,"",CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),6,1)+1,"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"),
IF(VALUE(MID(TEXT(INT(A1),
REPT(0,12)),5,1))>1,CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),6,1)+1,"","-one","-two","-three","-four","-five","-six","-seven","-eight","-nine"),
IF(VALUE(MID(TEXT(INT(A1),
REPT(0,12)),5,1))=0,CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),6,1)+1,"","one","two","three","four","five","six","seven","eight","nine"),"")),
IF(VALUE(MID(TEXT(INT(A1),
REPT(0,12)),4,3))>0," million ",""),CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),7,1)+1,"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six hundred ","seven hundred ","eight hundred ","nine hundred "),
CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),8,1)+1,"",CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),9,1)+1,"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"),
IF(VALUE(MID(TEXT(INT(A1),
REPT(0,12)),8,1))>1,CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),9,1)+1,"","-one","-two","-three","-four","-five","-six","-seven","-eight","-nine"),
IF(VALUE(MID(TEXT(INT(A1),
REPT(0,12)),8,1))=0,CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),9,1)+1,"","one","two","three","four","five","six","seven","eight","nine"),"")),
IF(VALUE(MID(TEXT(INT(A1),
REPT(0,12)),7,3))," thousand ",""),CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),10,1)+1,"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six hundred ","seven hundred ","eight hundred ","nine hundred "),
CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),11,1)+1,"",CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),12,1)+1,"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"),
IF(VALUE(MID(TEXT(INT(A1),
REPT(0,12)),11,1))>1,CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),12,1)+1,"","-one","-two","-three","-four","-five","-six","-seven","-eight","-nine"),
IF(VALUE(MID(TEXT(INT(A1),
REPT(0,12)),11,1))=0,CHOOSE(MID(TEXT(INT(A1),
REPT(0,12)),12,1)+1,"","one","two","three","four","five","six","seven","eight","nine"),"")))," "," "))&
IF(IFERROR(QUERY({A1},"where Col1 Contains '.'"),)<>"",
" and "®EXEXTRACT(TO_TEXT(A1), "\.(.+)")&" cents", ))," ", " ")
Since this is specifically for Google Sheet, you can use this
=REGEXEXTRACT(JOIN(", ",QUERY(IMPORTDATA("https://www.calculatorsoup.com/calculators/conversions/numberstowords.php?number=" & A1 & "&format=words&letter_case=lowercase&action=solve"),"where Col1 contains '<div id=""answer""><br>'")),">([^<]+)")
where A1 is the number you want to convert
Credit: spell number formulae or number to words. There are also many alternative solutions in that link, for example here's a way that uses array formula
=ArrayFormula(if(A2:A="","",if(len(int(A2:A))<13,"",if(right(left(int(A2:A),len(int(A2:A))-12),3)+0>99,choose(left(right(left(int(A2:A),len(int(A2:A))-12),3))+0,"one","two","three","four","five","six","seven","eight","nine")&" hundred ",)&if(right(right(left(int(A2:A),len(int(A2:A))-12),3),2)*1>19,choose(left(right(right(left(int(A2:A),len(int(A2:A))-12),3),2))-1,"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety")&choose(right(right(left(int(A2:A),len(int(A2:A))-12),3))+1,""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"),choose(right(right(left(int(A2:A),len(int(A2:A))-12),3),2)+1,"","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"))&" trillion")&" "&if(len(int(A2:A))<10,"",if(right(left(int(A2:A),len(int(A2:A))-9),3)+0>99,choose(left(right(left(int(A2:A),len(int(A2:A))-9),3))+0,"one","two","three","four","five","six","seven","eight","nine")&" hundred ",)&if(right(right(left(int(A2:A),len(int(A2:A))-9),3),2)*1>19,choose(left(right(right(left(int(A2:A),len(int(A2:A))-9),3),2))-1,"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety")&choose(right(right(left(int(A2:A),len(int(A2:A))-9),3))+1,""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"),choose(right(right(left(int(A2:A),len(int(A2:A))-9),3),2)+1,"","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"))&" billion")&" "&if(len(int(A2:A))<7,"",if(right(left(int(A2:A),len(int(A2:A))-6),3)+0>99,choose(left(right(left(int(A2:A),len(int(A2:A))-6),3))+0,"one","two","three","four","five","six","seven","eight","nine")&" hundred ",)&if(right(right(left(int(A2:A),len(int(A2:A))-6),3),2)*1>19,choose(left(right(right(left(int(A2:A),len(int(A2:A))-6),3),2))-1,"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety")&choose(right(right(left(int(A2:A),len(int(A2:A))-6),3))+1,""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"),choose(right(right(left(int(A2:A),len(int(A2:A))-6),3),2)+1,"","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"))&" million")&" "&if(len(int(A2:A))<4,"",if(right(left(int(A2:A),len(int(A2:A))-3),3)+0>99,choose(left(right(left(int(A2:A),len(int(A2:A))-3),3))+0,"one","two","three","four","five","six","seven","eight","nine")&" hundred ",)&if(right(right(left(int(A2:A),len(int(A2:A))-3),3),2)*1>19,choose(left(right(right(left(int(A2:A),len(int(A2:A))-3),3),2))-1,"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety")&choose(right(right(left(int(A2:A),len(int(A2:A))-3),3))+1,""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"),choose(right(right(left(int(A2:A),len(int(A2:A))-3),3),2)+1,"","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"))&" thousand")&" "&if(len(int(A2:A))<1,"",if(right(left(int(A2:A),len(int(A2:A))-0),3)+0>99,choose(left(right(left(int(A2:A),len(int(A2:A))-0),3))+0,"one","two","three","four","five","six","seven","eight","nine")&" hundred ",)&if(right(right(left(int(A2:A),len(int(A2:A))-0),3),2)*1>19,choose(left(right(right(left(int(A2:A),len(int(A2:A))-0),3),2))-1,"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety")&choose(right(right(left(int(A2:A),len(int(A2:A))-0),3))+1,""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"),choose(right(right(left(int(A2:A),len(int(A2:A))-0),3),2)+1,"","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen")))&if(int(A2:A)=0,"0 dollar",if(int(A2:A)<2," dollar"," dollars"))&iferror(" and "&if(round(mod(A2:A,1)*100,2)>19,choose(left(mod(A2:A,1)*100)-1,"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety")&choose(right(round(mod(A2:A,1)*100,2))+1,""," one"," two"," three"," four"," five"," six"," seven"," eight"," nine"),choose(round(mod(A2:A,1)*100,2)+1,"no","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"))&" cents")))
The output is
300 three hundred dollars and no cents
300.5 three hundred dollars and fifty cents
Just change the A2:A
in the array formula to the correct position if your numbers are in a different position
Another way is to clone the below 2 already-made sheets by selecting File > Make a copy and then use
Credit: Amount or Numbers to Words Converter Using Google Sheets. The author also introduced newer versions that need only a single sheet. If you want to use those clone it from here
You can try the Numbertext Add-on
=NUMBERTEXT("EUR 25") => twenty-five euro
=MONEYTEXT(25,"EUR") => twenty-five euro
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With