Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Using IF...THEN...ELSE for intelligent merging

From: Word 2010: Mail Merge in Depth

Video: Using IF...THEN...ELSE for intelligent merging

Almost any mail merge will work better if you use IF fields to add some logic. Actually, let me say that another way. If you know how to use IF, you'll be able to create mail merges that you wouldn't have imagined you could create. With IF, you can direct Word to examine the data for the record being merged, then take a specific action based on the value in the record. For example, if your data source contains address information, you could send one paragraph to recipients in California and a different paragraph, or no paragraph at all, to recipients in another state.

Using IF...THEN...ELSE for intelligent merging

Almost any mail merge will work better if you use IF fields to add some logic. Actually, let me say that another way. If you know how to use IF, you'll be able to create mail merges that you wouldn't have imagined you could create. With IF, you can direct Word to examine the data for the record being merged, then take a specific action based on the value in the record. For example, if your data source contains address information, you could send one paragraph to recipients in California and a different paragraph, or no paragraph at all, to recipients in another state.

At its simplest, an IF field works like this: if a condition is met, display one result; otherwise display another. That's what we want to do here. We have a paragraph that we'd actually like to direct only to folks who are outside of California, the folks who will be coming from out of state for our meeting. Now, we could type it in the letter. We could say, if you're from out of state, then we want to make it even easier. But it's kind of cool not to even show that information to folks unless they need it. So, I'm going to select this text, and let's turn off the highlighting that let you identify it, and now let's cut it, because we're going to use it again in a minute.

So, I am going to cut it to the clipboard, add a space right here where I am going to want to insert my IF field, and then, this is incredibly easy. Let's go to Mailings > Rules > IF...Then. ..Else, and we're going to say, IF the Business State Not equal to California. Now, it helps to know how your information is in your data source. IF it's CA, just the state abbreviation, I would only put CA here, but it's actually California, spelled out, in our data source.

A clue for that would be just to take a look here, by moving my dialog box, and notice in this letter where I am previewing the results, that the state names are spelled out. So, it says, IF the state name is not equal to California, then, and I'm going to hit Ctrl+V to paste my text. We want to make it even easier for out- of-state team members to participate: Jeff Jones is handling your housing and transportation, and will contact you directly. Otherwise, insert this text. Well, I don't have any text for the folks who are in California, nothing that fits here. I could say, aren't you lucky to live in California, but there's no point in doing that in this letter.

So, I now have an IF, and there is no Then, so I am going to say OK, and IF I hold Alt+F9, I can see my field code, and you'll notice that we have an IF field right here now. It looks kind of small, and it actually is. This font is smaller than the font around it. We'll take care of that in the minute. Let's go ahead to Finish & Merge and Edit Individual letters, so we can see the results of our merge. We don't have to do all of them, but we might as well, and I am going to click OK, and we'll be prompted.

Now, in the last few videos, we've added a lot of controls, a lot of fields, to our merge letter. So first we are asked, where is our meeting going to be, and we are going to meet in Tahiti, and click OK. The mailing date will be August 25 for our invitation, the meeting date is September 22, and we'll be asked the roles of different persons, and we'll just make them all Observers as we go along, because that's not what we are focused on here. What we are focused on is that when we get to someone in California, they won't have that extra sentence.

However, when we scroll down, for example, and look at Tyrone who's coming from New York, there is that: We want to make it even easier for out -of-town team members to participate. IF you're in California, we are not going to see that sentence. Keisha doesn't see it. However, Peter does, because he's coming from Phoenix. Now, I told you that the font was a little smaller. We are going to take care of that in the primary merge letters. Let's go ahead and close the results of this merge. We don't need them, and here, where we can see the text, we can actually go in and format it.

So, if I click on the Home tab of the Ribbon, you'll note that we are using a Calibri 12 pretty consistently throughout our letter. So, let's just select this text and make sure that it also is a Calibri 12, and that will take care of the issue. IF is a very powerful function. You can use it as many times as you wish, within a letter, to be able to make a distinction between one set of data and another, based on a value that's read from the data source at the time of the merge. Once you've mastered IF, you'll find more reasons to use mail merge, and far fewer reasons to type individual letters to groups of people.

Enjoy mail merge in Word 2010.

Show transcript

This video is part of

Image for Word 2010: Mail Merge in Depth
Word 2010: Mail Merge in Depth

23 video lessons · 11542 viewers

Gini Courter
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Word 2010: Mail Merge in Depth.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.