Build a provider-site key
Join provider P01234 and site S007 into P01234|S007, only when both are there.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | OR(A8="",B8="") | Checks if either ID is empty. | No, both are filled |
| 2 | "Review missing key" | Shown when an ID is missing. | Not used for row 8 |
| 3 | A8&"|"&B8 | The provider ID, a | sign, then the site ID. | "P01234|S007" |
| 4 | IF( … ) | Uses part 2 if part 1 finds a gap, else part 3. | "P01234|S007" |
Read it left to right. The | sign keeps the two IDs apart. The IDs here are made-up.
=IF(OR(A8="",B8=""),"Review missing key",A8&"|"&B8)How to use it
Yellow bar at the top? Click Enable Editing.
- See it work. The Example tab shows 20 made-up examples with the formula already in.
- Use your own IDs. Paste provider IDs and site IDs, stored as text, into the green columns of the Template tab. The keys fill in by themselves.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
Make sure no ID already contains a | sign. The key uses it to keep the two IDs apart.
Microsoft's help: IF function
OTHER ROUTES YOU MIGHT LIKE

Read an ID at the end of a web address
https://example.test/provider/000123?view=full → 000123
Get the template →
Read an ID by name from a web address
example.test/p?providerId=000123&view=full + providerId → 000123
Get the template →
Keep only IDs of an approved type
NPI + 1234567890 → 1234567890 (approved type)
Get the template →
Merge a few test letters before the whole mailing
Whole mailing → records 2 to 4 only
Take this route →