Reply
 
Thread Tools Display Modes
  #1   Report Post  
Michael Koerner
 
Posts: n/a
Default If data the same Disregard

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?


--

Regards
Michael Koerner



  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

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
"Michael Koerner" wrote in message
...
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?


--

Regards
Michael Koerner





  #3   Report Post  
Michael Koerner
 
Posts: n/a
Default

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

--

Regards
Michael Koerner


"Doug Robbins" wrote in message
...
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
"Michael Koerner" wrote in message
...
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?


--

Regards
Michael Koerner






  #4   Report Post  
Graham Mayor
 
Posts: n/a
Default

{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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org





Michael Koerner wrote:
It would, if I knew how to write that stuff.

--

Regards
Michael Koerner


"Doug Robbins" wrote in message
...
Use an If...then...else field that compares the MaidenName to the
LastName and only prints it if it is different


Doug Robbins - Word MVP
"Michael Koerner" wrote in message
...
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?


--

Regards
Michael Koerner



  #5   Report Post  
Michael Koerner
 
Posts: n/a
Default

Many thanks

--

Regards
Michael Koerner


"Graham Mayor" wrote in message
...
{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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org





Michael Koerner wrote:
It would, if I knew how to write that stuff.

--

Regards
Michael Koerner


"Doug Robbins" wrote in message
...
Use an If...then...else field that compares the MaidenName to the
LastName and only prints it if it is different


Doug Robbins - Word MVP
"Michael Koerner" wrote in message
...
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?


--

Regards
Michael Koerner






  #6   Report Post  
Greg
 
Posts: n/a
Default

Michael,

Have you tried?

Something like:

{IF {Mergefield "MaidenName"}{Mergefield "LastName"}{Mergefield
"MaidenName"}""}

  #7   Report Post  
Michael Koerner
 
Posts: n/a
Default

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


"Greg" wrote in message
oups.com...
Michael,

Have you tried?

Something like:

{IF {Mergefield "MaidenName"}{Mergefield "LastName"}{Mergefield
"MaidenName"}""}


  #8   Report Post  
Greg
 
Posts: n/a
Default

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.

  #9   Report Post  
Michael Koerner
 
Posts: n/a
Default

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


"Greg" wrote in message
oups.com...
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.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Specific Email Merge w/ Specific Attachements Mark B Mailmerge 9 February 21st 05 05:10 AM
Data Mess Karen Microsoft Word Help 4 February 8th 05 12:53 AM
Word Field Codes in Excel data file mranz Mailmerge 7 December 11th 04 09:02 AM
Mail merge error occurs when filtering Excel data source Dave Mailmerge 1 December 2nd 04 10:46 PM
Merge Data Source path Peter Jamieson Mailmerge 0 November 25th 04 07:15 PM


All times are GMT +1. The time now is 07:49 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"