Mail Merge Tags - Default value if none present

If the merge tag is: and there’s a blank field in sheets, I’d like to have it say “Property Owner”. Is there an easy way to do this? Sorry for the trouble but I’d appreciate any help you could provide. Thank you!

Let’s say you have a field column titled Name in Google Sheets, and you would like to use that field as a merge tag in your email or document template. The merge tag can be written in the template as {{Name}}

The problem with this approach is that if the Name field is blank in Google Sheets, it will be replaced with a blank in the merged email.

image

As a workaround, we can offer a default value that will be used if the name field is blank. This can be done using the IF formula in Google Sheets.

Inside your merge sheet, create a new column and give it a title like Property Owner. For the column values, we’ll use a formula:

=IF(ISBLANK(A2), "Sir", A2)

Put the formula inside all cells of the column.

Now, switch to your mail merge template and replace:

Dear {{Name}}

with:

Dear {{Property Owner}}

Thus, if the name is blank, it will use the default value in the merged document.