Differing Text Based on Merged Field

C

CJ

Hi,
I want to create a letter that will contain a list of
subject grades in the left column (that I will merge from
an Excel spreadsheet) and a comment in the right column
(actually I just tabbed over twice) that changes based on
the grade the student received for that subject. Example:

English A Fantastic Job! Keep up the good work. :)

or

English B Nice solid effort. Next time go for an A! I
know you can do it!

Of course the subject and grade would be listed only once.
What would change would be the comment. I would like to be
able to have a list of five different comments...and the
set of comments would not necessarily be the same from
subject to subject.

It seems the "Insert Word Field", "If...Then...Else"
option only allows you the possibility of two comments.
Can anyone point me in the right direction? TIA

CJ
 
M

macropod

Hi CJ,

You can use:
{IF{MERGEFIELD Score}= "A" "Fantastic Job! Keep up the good work."}
{IF{MERGEFIELD Score}= "B" "Nice solid effort. Next time go for an A!"}
{IF{MERGEFIELD Score}= "C" "Text for C."}
{IF{MERGEFIELD Score}= "D" "Text for D."}
{IF{MERGEFIELD Score}= "E" "Text for E."}
as a seies of IF tests, without the need for the 'else' part.

Alternatively, you could nest the IF tests:
{IF{MERGEFIELD Score}= "A" "Fantastic Job! Keep up the good work."
{IF{MERGEFIELD Score}= "B" "Nice solid effort. Next time go for an A!"
{IF{MERGEFIELD Score}= "C" "Text for C." {IF{MERGEFIELD Score}= "D" "Text
for D." "Text for E."}}}}
but that's a lot harder for most people to understand/maintain.

Cheers
 
G

Graham Mayor

In the first example, the series of fields should all follow one another on
the same line, wrapped naturally in Word. This may not be clear due to
wrapping options in the newsreader used to view the message.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top