Mail merge field to show blank if it contains certain text

kidwispa

Active Member
Joined
Mar 7, 2011
Messages
330
Hi,

I don't even know if this is possible but I hope someone can help me.

What I am trying to achieve is for a particular field (in this case Company Name) to show as blank when running a mail merge if it contains a particular term ("Residential")

Can anyone help?

Thanks in advance

:)
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi,

In Word 2010, go to the "Mailings" Tab, look in the "Write & Insert Fields" section, and then look at the "Rules" dropdown box. You should be able to take it from there (you'll want to use the "If...Then...Else" rule).

igold
 
Upvote 0
You could use a filed coded as:
{IF{MERGEFIELD Company_Name}<> "Residential" {MERGEFIELD Company_Name}}
or:
{IF«Company_Name»<> "Residential" «Company_Name»}

Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practicable to add them via any of the standard Word dialogues. Likewise, you can't type or copy & paste the chevrons (i.e. '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar. The spaces represented in the field construction are all required.
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,731
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top