Formula:
=TRIM(
IF($A1="","",
IF(INT(MOD($A1/10^12,10^3)),IF(INT(MOD($A1/10^12,10^3))<100,"",INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},INT(INT(MOD($A1/10^12,10^3))/100)+1)&" Hundred"&IF(MOD(INT(MOD($A1/10^12,10^3)),100)," and",""))&IF(MOD(INT(MOD($A1/10^12,10^3)),100)>=20,INDEX({""," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety"},INT(MOD(INT(MOD($A1/10^12,10^3)),100)/10))&INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},MOD(INT(MOD($A1/10^12,10^3)),10)+1),IF(MOD(INT(MOD($A1/10^12,10^3)),100)<10,INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},MOD(INT(MOD($A1/10^12,10^3)),10)+1),INDEX({" Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen"},MOD(INT(MOD($A1/10^12,10^3)),100)-9)))&" Trillion"&IF(OR(INT(MOD($A1/10^9,10^3)),INT(MOD(ROUND(INT($A1)/10^9-INT(INT($A1)/10^9),9)*10^3,10^3)),INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3)),INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3))),",",""),"")
&
IF(INT(MOD($A1/10^9,10^3)),IF(INT(MOD($A1/10^9,10^3))<100,"",INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},INT(INT(MOD($A1/10^9,10^3))/100)+1)&" Hundred"&IF(MOD(INT(MOD($A1/10^9,10^3)),100)," and",""))&IF(MOD(INT(MOD($A1/10^9,10^3)),100)>=20,INDEX({""," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety"},INT(MOD(INT(MOD($A1/10^9,10^3)),100)/10))&INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},MOD(INT(MOD($A1/10^9,10^3)),10)+1),IF(MOD(INT(MOD($A1/10^9,10^3)),100)<10,INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},MOD(INT(MOD($A1/10^9,10^3)),10)+1),INDEX({" Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen"},MOD(INT(MOD($A1/10^9,10^3)),100)-9)))&" Billion"&IF(OR(INT(MOD(ROUND(INT($A1)/10^9-INT(INT($A1)/10^9),9)*10^3,10^3)),INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3)),INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3))),",",""),"")
&
IF(INT(MOD(ROUND(INT($A1)/10^9-INT(INT($A1)/10^9),9)*10^3,10^3)),IF(INT(MOD(ROUND(INT($A1)/10^9-INT(INT($A1)/10^9),9)*10^3,10^3))<100,"",INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},INT(INT(MOD(ROUND(INT($A1)/10^9-INT(INT($A1)/10^9),9)*10^3,10^3))/100)+1)&" Hundred"&IF(MOD(INT(MOD(ROUND(INT($A1)/10^9-INT(INT($A1)/10^9),9)*10^3,10^3)),100)," and",""))&IF(MOD(INT(MOD(ROUND(INT($A1)/10^9-INT(INT($A1)/10^9),9)*10^3,10^3)),100)>=20,INDEX({""," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety"},INT(MOD(INT(MOD(ROUND(INT($A1)/10^9-INT(INT($A1)/10^9),9)*10^3,10^3)),100)/10))&INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},MOD(INT(MOD(ROUND(INT($A1)/10^9-INT(INT($A1)/10^9),9)*10^3,10^3)),10)+1),IF(MOD(INT(MOD(ROUND(INT($A1)/10^9-INT(INT($A1)/10^9),9)*10^3,10^3)),100)<10,INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},MOD(INT(MOD(ROUND(INT($A1)/10^9-INT(INT($A1)/10^9),9)*10^3,10^3)),10)+1),INDEX({" Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen"},MOD(INT(MOD(ROUND(INT($A1)/10^9-INT(INT($A1)/10^9),9)*10^3,10^3)),100)-9)))&" Million"&IF(OR(INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3)),INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3))),",",""),"")
&
IF(INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3)),IF(INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3))<100,"",INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},INT(INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3))/100)+1)&" Hundred"&IF(MOD(INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3)),100)," and",""))&IF(MOD(INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3)),100)>=20,INDEX({""," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety"},INT(MOD(INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3)),100)/10))&INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},MOD(INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3)),10)+1),IF(MOD(INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3)),100)<10,INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},MOD(INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3)),10)+1),INDEX({" Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen"},MOD(INT(MOD(ROUND(INT($A1)/10^6-INT(INT($A1)/10^6),7)*10^3,10^3)),100)-9)))&" Thousand"&IF(INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3)),",",""),"")
&
IF(INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3)),IF(INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3))<100,"",INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},INT(INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3))/100)+1)&" Hundred"&IF(MOD(INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3)),100)," and",""))&IF(MOD(INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3)),100)>=20,INDEX({""," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety"},INT(MOD(INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3)),100)/10))&INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},MOD(INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3)),10)+1),IF(MOD(INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3)),100)<10,INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},MOD(INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3)),10)+1),INDEX({" Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen"},MOD(INT(MOD(ROUND(INT($A1)/10^3-INT(INT($A1)/10^3),3)*10^3,10^3)),100)-9))),"")
&
IF($A1<1,"Zero","")&IF(INT($A1)=1," Dollar"," Dollars")&" and"
&
IF(ROUND(($A1-INT($A1))*100,0)<1," Zero",IF(ROUND(($A1-INT($A1))*100,0)>=20,INDEX({""," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety"},INT(ROUND(($A1-INT($A1))*100,0)/10))&INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},MOD(ROUND(($A1-INT($A1))*100,0),10)+1),IF(ROUND(($A1-INT($A1))*100,0)<10,INDEX({""," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"},MOD(ROUND(($A1-INT($A1))*100,0),10)+1),INDEX({" Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen"},ROUND(($A1-INT($A1))*100,0)-9))))&IF(ROUND(($A1-INT($A1))*100,0)=1," Cent"," Cents")
)
)
Bookmarks