Conditional Merge Fields

How to create merge fields that are conditional upon the content of other fields?

This article describes how to create conditional merge fields when the content of a new merge field is automatically determined by filtering an existing merge field.

Step 1: Create conditional format column 

In Google Sheets, create a new column for the conditional format needed.

In the example below, conditional formatting was used in the label merge to determine the title to be used for each person, depending on their gender. So an additional column called Title was created.

Step 2: Type conditional logic formula 

Type the conditional logic formula in the first cell of the column to be conditionally formatted.

In this example, the formula states that if the gender in C2 is M, then display Mr in G2, otherwise show Ms in G2.

Step 3: Apply conditional logic formula 

Apply the conditional logic formula to the rest of the cells in the column, by dragging the first cell downward from the bottom-right corner.

Step 4: Insert conditional merge fields

In the label template, insert the conditional *|merge field|* into the merge template as for any other merge field.

In this example, *|Title|* and *|Name|* were inserted next to each other with a space between each *|merge field|*.