Conditional Formatting

How to apply different conditional formatting to merge fields in Google Sheets for a mail merge?

This article describes how to apply different mail merge conditional formatting  to merge fields in Google Sheets.

Step 1: Create column for conditional formatting

In Google Sheets, create a column for every merge field that is going to be conditionally formatted

In this example, two columns called City-Blue and City-Red have been created to display:

Step 2: Type conditional logic formula in first column 

Type the conditional logic formula in the first cell of the first column for the merge field that is going to be conditionally formatted.

In this example, the logic formula has multiple conditions; if the city name in C2 is San Francisco or Las Vegas, then the city name is shown in the D2 cell, otherwise the D2 cell is left blank.

Step 3: Type conditional logic formula in second column 

Type the conditional logic formula in the first cell of the second column for the merge field that is going to be conditionally formatted.

In this example, the logic formula has multiple conditions; if the city name in C2 is Chicago,  then the city name is shown in the E2 cell, otherwise the E2 cell is left blank.

Step 4: Apply conditional logic formula in each column 

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

Step 5: Insert conditional *|merge fields|*

In the merge template for the mail merge, insert the conditional *|merge fields|* as for any other merge field.

In this example, *|City-Blue|* and *|City-Red|* have been inserted beside each other with a space in between.

Step 6: Format conditional *|merge fields|*

Format the conditional *|merge fields|* by highlighting them and then changing their color or selecting any other formatting option as required. 

In this example, *|City-Blue|* was changed to blue text and *|City-Red|* was changed to red text.