Make a Dear Title Last Name greeting

Turn Dr. and Reed into Dear Dr. Reed, for the first line of a letter.

What you'll make

In Excel: Dr. + Reed becomes Dear Dr. Reed,.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1TRIM(B8)=""Checks whether the last name is empty.Not empty
2"Dear "Starts with Dear and a space."Dear "
3TRIM(A8&" "&B8)Adds the title and last name, without stray spaces."Dear Dr. Reed"
4","Adds a comma at the end."Dear Dr. Reed,"
5IF( … )Shows nothing when the last name is empty."Dear Dr. Reed,"

Read it left to right. A blank title leaves no extra space before the last name.

=IF(TRIM(B8)="","","Dear "&TRIM(A8&" "&B8)&",")

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up names with the formula already in.
  2. Use your own names. Paste titles and last names into the green columns of the Template tab. Leave the title empty when there isn't one.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Titles are used exactly as typed, and none are guessed. Check each one is the title the person uses.

Route: Get names ready for the letter

Microsoft's help: IF function