Conditional Merge Fields
How do I create conditional merge fields?
In Google Sheets, create an additional column for the conditional format you need.
In the example below, we want to use conditional formatting in our mail merge to determine the title used for each person, depending on the individual's gender. We have therefore created an additional column called Title.
Write the conditional logic formula in the formula bar of 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 show Mr in G2, but if the gender in C2 is F, then show Ms in G2.
Apply the conditional logic formula to the rest of the cells in each column, by dragging the first cell downward from the bottom-right corner.
In your merge template, insert the conditional merge field into your merge template as you would for any other merge field.
In this example, we inserted *|Title|* and *|Name|* next to each other with a space between each merge field.