A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

If data the same Disregard



 
 
Thread Tools Display Modes
  #1  
Old May 9th, 2005, 06:17 PM
Michael Koerner
external usenet poster
 
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  
Old May 10th, 2005, 09:09 AM
Doug Robbins
external usenet poster
 
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  
Old May 10th, 2005, 12:49 PM
Michael Koerner
external usenet poster
 
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  
Old May 10th, 2005, 02:07 PM
Graham Mayor
external usenet poster
 
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  
Old May 10th, 2005, 02:20 PM
Michael Koerner
external usenet poster
 
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  
Old May 10th, 2005, 02:31 PM
Greg
external usenet poster
 
Posts: n/a
Default

Michael,

Have you tried?

Something like:

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

  #7  
Old May 10th, 2005, 03:56 PM
Michael Koerner
external usenet poster
 
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  
Old May 10th, 2005, 05:27 PM
Greg
external usenet poster
 
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  
Old May 10th, 2005, 05:59 PM
Michael Koerner
external usenet poster
 
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.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to have multiple queries feeding a single report PZ Straube Setting Up & Running Reports 15 June 15th, 2005 08:16 AM
Data Source issues. ??data.access.pages Phil Database Design 2 October 11th, 2004 02:42 AM
Data Source issues Philippe Database Design 1 October 10th, 2004 09:45 PM
Countif with 2 or more data ranges in same column Doug Worksheet Functions 1 July 4th, 2004 08:57 AM
How to create graphs in a monthly report where the base data can change John Clarke Charts and Charting 3 June 25th, 2004 02:22 AM


All times are GMT +1. The time now is 05:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.