Forum Discussion
NUMBER TO WORDS
You mean: in cell B1 will show "One hundred fifty five thousand six hundred fifty five", in B2, B3 are similar, right....?
I wonder how to show it, too?
Yes, which formula should I use??
- SnowMan55Jul 04, 2025Bronze Contributor
Hans's formulas do not take advantage of the LET function. I wrote three alternative formulas that use the LET function to reduce the size of the formulas, improve calculation speed, and make the formulas easier to read.
See the attached workbook.
In my performance tests, each of the three alternatives had about the same performance. I like the shortest formula the best:
=IFS(A3<0,"Referred cell value must not be negative!", A3>10^12-0.01,"Exceeds maximum which is 999999999999.99", TRUE, LET(cell, A3, use_proper_case, TRUE, text_int, TEXT(INT(cell),REPT(0,12)), dec_pt_posn, FIND(".",cell), hundreds, {"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six hundred ","seven hundred ","eight hundred ","nine hundred "}, teens, {"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"}, units, {"","one","two","three","four","five","six","seven","eight","nine"}, hyph_units, {"","-one","-two","-three","-four","-five","-six","-seven","-eight","-nine"}, words, TRIM(CONCATENATE( INDEX(hundreds, MID(text_int,1,1)+1),CHOOSE(MID(text_int,2,1)+1,"",INDEX(teens, MID(text_int,3,1)+1),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"), IF(VALUE(MID(text_int,2,1))>1,INDEX(hyph_units, MID(text_int,3,1)+1),IF(VALUE(MID(text_int,2,1))=0,INDEX(units, MID(text_int,3,1)+1),"")),IF(cell>=10^9," billion ",""), INDEX(hundreds, MID(text_int,4,1)+1),CHOOSE(MID(text_int,5,1)+1,"",INDEX(teens, MID(text_int,6,1)+1),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"), IF(VALUE(MID(text_int,5,1))>1,INDEX(hyph_units, MID(text_int,6,1)+1),IF(VALUE(MID(text_int,5,1))=0,INDEX(units, MID(text_int,6,1)+1),"")),IF(VALUE(MID(text_int,4,3))>0," million ",""), INDEX(hundreds, MID(text_int,7,1)+1),CHOOSE(MID(text_int,8,1)+1,"",INDEX(teens, MID(text_int,9,1)+1),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"), IF(VALUE(MID(text_int,8,1))>1,INDEX(hyph_units, MID(text_int,9,1)+1),IF(VALUE(MID(text_int,8,1))=0,INDEX(units, MID(text_int,9,1)+1),"")),IF(VALUE(MID(text_int,7,3))," thousand ",""), INDEX(hundreds, MID(text_int,10,1)+1),CHOOSE(MID(text_int,11,1)+1,"",INDEX(teens, MID(text_int,12,1)+1),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"), IF(VALUE(MID(text_int,11,1))>1,INDEX(hyph_units, MID(text_int,12,1)+1),IF(VALUE(MID(text_int,11,1))=0,INDEX(units, MID(text_int,12,1)+1),"")) )), IF(use_proper_case, PROPER(words), words) & IF(ISERROR(dec_pt_posn), IF(INT(cell)=0,""," and ")&"00/100", IF(INT(cell)=0,""," and ")&--LEFT(MID(cell,dec_pt_posn+1,2)&"00",2)&"/100") ) )Note that I included an "option" (use_proper_case) for generating either proper-case text or lower-case text.
- HansVogelaarMay 29, 2025MVP
You can use any of the formulas mentioned in the links in this discussion. You can test which one works best for you.