Is it possible to use a formula in a pop-up window to make the message variable
sample.xlsx | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | |||
1 | ||||||||||||||
2 | amount 1 | amount 2 | amount 3 | amount 4 | amount 5 | total | ||||||||
3 | 100.00 | 0.25 | 3.75 | 5.00 | 4.38 | 113.38 | ||||||||
4 | 34.98 | 45.00 | 18.25 | 398.33 | 18.25 | 514.81 | ||||||||
5 | ||||||||||||||
6 | ||||||||||||||
7 | One Hundred and Thirteen & 38 Cents Only. | |||||||||||||
8 | ||||||||||||||
9 | ||||||||||||||
10 | ||||||||||||||
11 | ||||||||||||||
12 | ||||||||||||||
13 | =CHOOSE(LEFT(TEXT(G3,"000000000.00"))+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--LEFT(TEXT(G3,"000000000.00"))=0,,IF(AND(--MID(TEXT(G3,"000000000.00"),2,1)=0,--MID(TEXT(G3,"000000000.00"),3,1)=0)," Hundred"," Hundred and ")) &CHOOSE(MID(TEXT(G3,"000000000.00"),2,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ") &IF(--MID(TEXT(G3,"000000000.00"),2,1)<>1,CHOOSE(MID(TEXT(G3,"000000000.00"),3,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"), CHOOSE(MID(TEXT(G3,"000000000.00"),3,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen")) &IF((--LEFT(TEXT(G3,"000000000.00"))+MID(TEXT(G3,"000000000.00"),2,1)+MID(TEXT(G3,"000000000.00"),3,1))=0,,IF(AND((--MID(TEXT(G3,"000000000.00"),4,1)+MID(TEXT(G3,"000000000.00"),5,1)+MID(TEXT(G3,"000000000.00"),6,1)+MID(TEXT(G3,"000000000.00"),7,1))=0,(--MID(TEXT(G3,"000000000.00"),8,1)+RIGHT(TEXT(G3,"000000000.00")))>0)," Million and "," Million ")) &CHOOSE(MID(TEXT(G3,"000000000.00"),4,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--MID(TEXT(G3,"000000000.00"),4,1)=0,,IF(AND(--MID(TEXT(G3,"000000000.00"),5,1)=0,--MID(TEXT(G3,"000000000.00"),6,1)=0)," Hundred"," Hundred and")) &CHOOSE(MID(TEXT(G3,"000000000.00"),5,1)+1,,," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety") &IF(--MID(TEXT(G3,"000000000.00"),5,1)<>1,CHOOSE(MID(TEXT(G3,"000000000.00"),6,1)+1,," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"),CHOOSE(MID(TEXT(G3,"000000000.00"),6,1)+1," Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen")) &IF((--MID(TEXT(G3,"000000000.00"),4,1)+MID(TEXT(G3,"000000000.00"),5,1)+MID(TEXT(G3,"000000000.00"),6,1))=0,,IF(OR((--MID(TEXT(G3,"000000000.00"),7,1)+MID(TEXT(G3,"000000000.00"),8,1)+MID(TEXT(G3,"000000000.00"),9,1))=0,--MID(TEXT(G3,"000000000.00"),7,1)<>0)," Thousand "," Thousand and ")) &CHOOSE(MID(TEXT(G3,"000000000.00"),7,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--MID(TEXT(G3,"000000000.00"),7,1)=0,,IF(AND(--MID(TEXT(G3,"000000000.00"),8,1)=0,--MID(TEXT(G3,"000000000.00"),9,1)=0)," Hundred "," Hundred and "))& CHOOSE(MID(TEXT(G3,"000000000.00"),8,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ") &IF(--MID(TEXT(G3,"000000000.00"),8,1)<>1,CHOOSE(MID(TEXT(G3,"000000000.00"),9,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"),CHOOSE(MID(TEXT(G3,"000000000.00"),9,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen")) &IF(RIGHT(TEXT(G3,"000000000.00"),2)>"000000000.00"," & "&RIGHT(TEXT(G3,"000000000.00"),2)&" Cents Only."," Only.") | |||||||||||||
14 | ||||||||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
G3:G4 | G3 | =SUM(B3:F3) |
B7 | B7 | =CHOOSE(LEFT(TEXT(G3,"000000000.00"))+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--LEFT(TEXT(G3,"000000000.00"))=0,,IF(AND(--MID(TEXT(G3,"000000000.00"),2,1)=0,--MID(TEXT(G3,"000000000.00"),3,1)=0)," Hundred"," Hundred and ")) &CHOOSE(MID(TEXT(G3,"000000000.00"),2,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ") &IF(--MID(TEXT(G3,"000000000.00"),2,1)<>1,CHOOSE(MID(TEXT(G3,"000000000.00"),3,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"), CHOOSE(MID(TEXT(G3,"000000000.00"),3,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen")) &IF((--LEFT(TEXT(G3,"000000000.00"))+MID(TEXT(G3,"000000000.00"),2,1)+MID(TEXT(G3,"000000000.00"),3,1))=0,,IF(AND((--MID(TEXT(G3,"000000000.00"),4,1)+MID(TEXT(G3,"000000000.00"),5,1)+MID(TEXT(G3,"000000000.00"),6,1)+MID(TEXT(G3,"000000000.00"),7,1))=0,(--MID(TEXT(G3,"000000000.00"),8,1)+RIGHT(TEXT(G3,"000000000.00")))>0)," Million and "," Million ")) &CHOOSE(MID(TEXT(G3,"000000000.00"),4,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--MID(TEXT(G3,"000000000.00"),4,1)=0,,IF(AND(--MID(TEXT(G3,"000000000.00"),5,1)=0,--MID(TEXT(G3,"000000000.00"),6,1)=0)," Hundred"," Hundred and")) &CHOOSE(MID(TEXT(G3,"000000000.00"),5,1)+1,,," Twenty"," Thirty"," Forty"," Fifty"," Sixty"," Seventy"," Eighty"," Ninety") &IF(--MID(TEXT(G3,"000000000.00"),5,1)<>1,CHOOSE(MID(TEXT(G3,"000000000.00"),6,1)+1,," One"," Two"," Three"," Four"," Five"," Six"," Seven"," Eight"," Nine"),CHOOSE(MID(TEXT(G3,"000000000.00"),6,1)+1," Ten"," Eleven"," Twelve"," Thirteen"," Fourteen"," Fifteen"," Sixteen"," Seventeen"," Eighteen"," Nineteen")) &IF((--MID(TEXT(G3,"000000000.00"),4,1)+MID(TEXT(G3,"000000000.00"),5,1)+MID(TEXT(G3,"000000000.00"),6,1))=0,,IF(OR((--MID(TEXT(G3,"000000000.00"),7,1)+MID(TEXT(G3,"000000000.00"),8,1)+MID(TEXT(G3,"000000000.00"),9,1))=0,--MID(TEXT(G3,"000000000.00"),7,1)<>0)," Thousand "," Thousand and ")) &CHOOSE(MID(TEXT(G3,"000000000.00"),7,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine") &IF(--MID(TEXT(G3,"000000000.00"),7,1)=0,,IF(AND(--MID(TEXT(G3,"000000000.00"),8,1)=0,--MID(TEXT(G3,"000000000.00"),9,1)=0)," Hundred "," Hundred and "))& CHOOSE(MID(TEXT(G3,"000000000.00"),8,1)+1,,,"Twenty ","Thirty ","Forty ","Fifty ","Sixty ","Seventy ","Eighty ","Ninety ") &IF(--MID(TEXT(G3,"000000000.00"),8,1)<>1,CHOOSE(MID(TEXT(G3,"000000000.00"),9,1)+1,,"One","Two","Three","Four","Five","Six","Seven","Eight","Nine"),CHOOSE(MID(TEXT(G3,"000000000.00"),9,1)+1,"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen")) &IF(RIGHT(TEXT(G3,"000000000.00"),2)>"000000000.00"," & "&RIGHT(TEXT(G3,"000000000.00"),2)&" Cents Only."," Only.") |