Conditionally include a "new line" character/instruction?

R

rmillward

I have an Excel sheet with employee names in the first column, then a
series of job roles in succeeding columns. Where an employee has been
assigned a role, the intersection of employee (row) and role (column)
has a "1". I want to create a Word document that lists the employee's
name and then a list of _only_ the roles to which they've been
assigned.

I've figured out how to check the various role fields and print a text
string if the person's been assigned and to print "nothing" if they are
not assigned. But what I'm trying to do is create a _list_ of those
roles, and I can't figure out is how to include a "newline" or
"carriage return" of some kind to go down to the next line. I assume it
has to be included in the second clause of the IF, where the first is
the conditional test and the second is the action to take if "true,"
but nothing I've tried results in an actual move to the next line.

I got "volunteered" to do this, and the deadline is very, very short.
I'd be extremely grateful to ANYBODY who can give me any pointers on
how to do something like this.
 
P

Peter Jamieson

OK, so you have a fixed maximum number of "role" columns - let's call the
roleA, roleB etc. - , so you need something like

{ IF { MERGEFIELD roleA } = "1" "roleA
" "" }{ IF { MERGEFIELD roleB } = "1" "roleB
" "" }{ IF { MERGEFIELD roleC } = "1" "roleC
" "" }

and so on, where the character between the second roleA and the following
double quote mark is a paragraph mark that you insert using the enter key
just as you would insert any other paragraph mark in Word.

Peter Jamieson
 

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