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 2007: 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 to your merge. With If you direct Word to examine the data for the record being merged, then take a specific action based on a value in that data record. For example, if your data source contains address information, you could send one paragraph to your recipients who live in California and a different paragraph to recipients who live in other states. Another use of If is getting rid of unwanted spaces and unwanted punctuations that results from blank fields in address blocks or in the name.

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

Almost any mail merge will work better if you use If fields to add some logic to your merge. With If you direct Word to examine the data for the record being merged, then take a specific action based on a value in that data record. For example, if your data source contains address information, you could send one paragraph to your recipients who live in California and a different paragraph to recipients who live in other states. Another use of If is getting rid of unwanted spaces and unwanted punctuations that results from blank fields in address blocks or in the name.

At its simplest, an If field works like this. If a condition is met, display the first result. If it's not, display the second result. In our letter, we actually have a paragraph that we want to have appear only for folks who are not in the state of California. You will notice that we have in blue, "We want to make it even easier for out-of-state members to participate. Jeff Jones is handling your housing and transportation, and will contact you directly." And we would like that sentence to appear for the folks who live in Oklahoma and Colorado and Wyoming, but not for our people from California who are not out-of-state.

Let's see how we can handle this with an If. First, I am going to simply remove the formatting and we are going to cut this sentence so that we have it available for our use. We will add a space because we would want a space and we will go to the Mailings tab, to Rules and choose If Then Else. And it says If the Business State and now we have two choices. We can say if it's equal to California, or if it's not equal to California and that choice will determine where we are going to paste our text.

So let's say, for example, that if the state is equal to California, then we are going to do nothing. However, if it's not equal to California-- and I am going to do Ctrl+V to paste our text that we just cut from our letter. So if the state is equal to California, do nothing. Otherwise, insert this text because we can assume that person is out-of-state. We could have also chosen to do this again and sort of in the opposite direction.

We could say if the Business State is not California, do this. Otherwise, do nothing because it is California. That's sort of reverse logic but it's sometimes the way you want to be thinking about how you use If. Let's go ahead and say OK. And you will notice that our field, if I select a field, the text is slightly smaller than our text that we have here. So let's go back to our Home tab and we will notice this is Calibri 12, and at that box that we typed into actually returns 10 point font. That's okay.

Let's just select and format this as Calibri 12 and by formatting the field, it will come in properly. So now when we actually conduct this mail merge, let's go back to the Mailings tab, and we are going to edit individual letters and merge all the records and what we will find is that Crystal, who is in Albuquerque, has this additional paragraph and Guy is in Arizona. He has this additional sentence in the paragraph, okay and Nora. But notice that when we get to Keisha Bird, who lives in California, there is no sentence about Jeff Jones being available to manage for travel.

She doesn't need to Jeff is doing for anybody else. She is in state and that's fine. So as we go through our letters, we will notice that the folks who are in California like Billy don't have that remaining line, but if you are in Charlotte, Wisconsin, Jeff Jones is going to handle your housing and your transportation. If fields are incredibly powerful and once you have mastered how to use If, you are going to find even more reasons that you can use mail merge and fewer reasons that you believe you need to type individual letters that actually go to groups of people.

Show transcript

This video is part of

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

22 video lessons · 6375 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 2007: 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.