#1




Express Mergefield Number as Text
How could I convert Currency in to words without VBA.... I want achieve this with a formula....
Amount Field Name: PAYMENTVALUETOTAL Like this, "$1,000.23", I need it like "One thousand dollars and twenty three cents" how could I achieve this via formula... Thanks, Naveen 
#2




For that you could use a field constructed as:
Code:
{QUOTE{SET Val «PAYMENTVALUETOTAL»}↵ {IF{=INT(Val/100000000)}<> 0 "{=INT(Val/100000000) \*Cardtext} hundred "}↵ {IF{=MOD(INT(Val/1000000),100)}<> 0 "{IF{=MOD(INT(Val/100000000),10)}<> 0 "and "}"}↵ {IF{=INT(Val/100000)}<> 0 "{=MOD(INT(Val/1000000),100) \*Cardtext} million{IF{=MOD(INT(Val/1000),10)}<> 0 ","} "}↵ {IF{=MOD(INT(Val/100000),10)}<> 0 "{=MOD(INT(Val/100000),10) \*Cardtext} hundred "}↵ {IF{=MOD(INT(Val/1000),100)}<> 0 "{IF{=MOD(INT(Val/100000),10)}<> 0 "and "}" {IF{=MOD(INT(Val/1000),10)}<> 0 "thousand{IF{=MOD(INT(Val/1000),10)}= 0 "," }} "}↵ {IF{=MOD(INT(Val/1000),10)}<> 0 "{=MOD(INT(Val/1000),100) \*Cardtext} thousand{IF{= MOD(INT(Val/100),10)}<> 0 ","} "}↵ {IF{=MOD(INT(Val/100),10)}<> 0 "{=MOD(INT(Val/100),10) \*Cardtext} hundred "}↵ {IF{=MOD(INT(Val),100)}<> 0 "{IF{=INT(Val/100)}<> 0 "and "}{=MOD(INT(Val),100) \*Cardtext} "}↵ {=INT(Val) \# \dollar}{IF{=INT(Val)}<> 0 "s"}↵ " and {=MOD(Val,1)*100 \*Cardtext} cent{IF{=MOD(Val,1)}<> 0.01 s}" \* FirstCap} Mailmerge Tips & Tricks
__________________
Cheers, Paul Edstein [MS MVP  Word] 
#3




I had done exactly same as you had suggested but getting error
"Minus Error! Unknown op code for conditional.Error! Unknown op code for conditional.six thousand, zero hundred zerodollars" Thanks, Naveen 
#4




That tells me you haven't matched exactly the field coding I posted. The error could be as simple as the omission of a space character.
__________________
Cheers, Paul Edstein [MS MVP  Word] 
#5




If I have 1000.00 dollars. This formula doesn't give output value as One Thousand Dollars and Zero Cents. Instead it is coming only as One Thousand Dollars, It is not bringing decimal characters only for zero cents... could you please help me on this

#6




I have revised the field code in post #2. Try it now.
__________________
Cheers, Paul Edstein [MS MVP  Word] 
#7




Thanks Paul,
while I was testing I found this issue,For Example if my amount was 5000000, output is like this Five Million Zero Hundred Zero Thousand Dollars And Zero Cents but instead it should show like this Five Million Dollars and Zero cents. How could I achieve this.... 
#8




Try the revised field code  changes noted in red.
__________________
Cheers, Paul Edstein [MS MVP  Word] 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Mergefield  Replace Prefix of Document Number  boonlailee  Mail Merge  13  06132019 04:38 PM 
Word MergeField Code Text issue  stevenel  Mail Merge  17  09272018 09:12 PM 
Printing selected pages based on a MERGEFIELD.g. If MERGEFIELD=x then print pages 1,2,4 if MERGEFIEL  Richard.p  Word  3  04212015 01:14 AM 
Omit mergefield if it contains specific text  MikeStewart  Mail Merge  3  10012014 01:31 AM 
IF statement just generates text "MERGEFIELD" in document  what am I doing wrong?  Eri  Mail Merge  1  03032012 03:03 PM 