If data the same Disregard

  • Thread starter Michael Koerner
  • Start date
M

Michael Koerner

Using Office 2002

Using Excel as the data source, I am putting together through Word's mailmerge,
a list containing:
LastName, FirstName, MaidenName

If the LastName and the MaidenName are the same I do not want the Maiden Name
data merged, and the table cell to be blank. Is there a simple way to do this?
 
D

Doug Robbins

Use an If...then...else field that compares the MaidenName to the LastName
and only prints it if it is different

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
M

Michael Koerner

It would, if I knew how to write that stuff.

--

Regards
Michael Koerner


Use an If...then...else field that compares the MaidenName to the LastName
and only prints it if it is different

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
G

Graham Mayor

{IF {Mergefield LastName} <> {Mergefield MaidenName} "{Mergefield
MaidenName}"}

You need to create the above using CTRL+F9 for each pair of field brackets.
Put in the MaidenName cell this will only enter content if the fields have
different content.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Michael Koerner

Many thanks

--

Regards
Michael Koerner


{IF {Mergefield LastName} <> {Mergefield MaidenName} "{Mergefield
MaidenName}"}

You need to create the above using CTRL+F9 for each pair of field brackets.
Put in the MaidenName cell this will only enter content if the fields have
different content.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Greg

Michael,

Have you tried?

Something like:

{IF {Mergefield "MaidenName"}<>{Mergefield "LastName"}{Mergefield
"MaidenName"}""}
 
M

Michael Koerner

I did, works well, thanks to Graham Mayor. I notice that your code although
similar to his has "" around all the Mergefield names. Is there an advantage to
this?

--

Regards
Michael Koerner


Michael,

Have you tried?

Something like:

{IF {Mergefield "MaidenName"}<>{Mergefield "LastName"}{Mergefield
"MaidenName"}""}
 
G

Greg

Michael,

No advantage that I know of and it might not even work. I didn't have
a document to test with and I guessed if the speech marks were required
or not. Graham's method is probably best.
 
M

Michael Koerner

I'll have to try it out and see. Seems to me I read somewhere that it was
acceptable both ways. Thanks again.

--

Regards
Michael Koerner


Michael,

No advantage that I know of and it might not even work. I didn't have
a document to test with and I guessed if the speech marks were required
or not. Graham's method is probably best.
 

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