View Single Post
 
Old 07-02-2015, 06:58 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could use either:
{QUOTE"{SET Months {MERGEFIELD Loanmonths}}{=INT(Months/12) \# "0' year(s)'"} and {=MOD(Months,12) \# "0' month(s)'"}"}
for an output like:
# year(s) and # month(s)
or, somewhat more sophisticated:
{QUOTE"{SET Months {MERGEFIELD Loanmonths}}{=INT(Months/12)-1 \# "{=INT(Months/12) \# "0' years'"};;'1 year'"}{=(Months-INT(Months/12)*12)*(Months>12) \# "' and ';;"}{=MOD(Months,12)-1 \# "{=MOD(Months,12) \# "0' months'"};;'1 month'"}"}"}
for an output like:
1 month
2 months
1 year
2 years
1 year and 1 month
1 year and 2 months
2 years and 1 month
2 years and 2 months

For a macro to convert the above field code text representations to working field codes, See Convert Text Representations of Fields to Working Fields in the Mailmerge Tips and Tricks sticky thread (https://www.msofficeforums.com/mail-...ps-tricks.html) at the top of this forum.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote