Make a greeting for two titled surnames
Turn Dr. Reed and Prof. Park into Dear Dr. Reed and Prof. Park, for one letter.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | TRIM(B8)="" | Checks whether the first last name is empty. | Not empty |
| 2 | "Dear " | Starts with Dear and a space. | "Dear " |
| 3 | TRIM(A8&" "&B8) | Adds the first title and last name. | "Dear Dr. Reed" |
| 4 | IF(TRIM(D8)…)&"," | Adds and the second person, if any, then a comma. | " and Prof. Park," |
| 5 | IF( … ) | Shows nothing when the first last name is empty. | "Dear Dr. Reed and …" |
Read it left to right. Part 4 also adds the comma at the end. A blank title leaves no extra space.
=IF(TRIM(B8)="","","Dear "&TRIM(A8&" "&B8)&IF(TRIM(D8)="",""," and "&TRIM(C8&" "&D8))&",")How to use it
Yellow bar at the top? Click Enable Editing.
- See it work. The Example tab shows 20 made-up names with the formula already in.
- Use your own names. Paste titles and last names into the green columns of the Template tab. Leave the second pair empty for one person.
- 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
OTHER ROUTES YOU MIGHT LIKE

Make a consistent name key
Ava + Reed → reed|ava
Get the template →
Join up to three names with a final and
Ava + Noah + Mia → Ava, Noah and Mia
Get the template →
Choose a person or organization label
Person + Ava Reed + Acme → Ava Reed
Get the template →
Fix "Dear ," when a first name is blank
(blank) → Dear colleague,
Take this route →