Choose an NPI or a local fallback
Write NPI: 1234567890, or Local ID: 000123 when the NPI is blank.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | A8<>"" | Checks that the NPI cell isn't empty. | TRUE |
| 2 | "NPI: "&A8 | Writes NPI: and the NPI. | "NPI: 1234567890" |
| 3 | IF(B8<>"", … ) | Otherwise writes Local ID: and the local ID. | Not used for row 8 |
| 4 | IF( … ) | Uses part 2 when there is an NPI, else part 3. | "NPI: 1234567890" |
The label shows which ID was used. When both cells are empty, the Template stays blank. The IDs here are made-up.
=IF(A8<>"","NPI: "&A8,IF(B8<>"","Local ID: "&B8,"Review: missing identifier"))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 NPIs and local IDs, stored as text, into the green columns of the Template tab. Leave the NPI empty when there isn't one.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
Use a local ID only where your letter allows one. A field that needs an NPI still needs a real NPI.
Microsoft's help: IF function
OTHER ROUTES YOU MIGHT LIKE

Format an NPI or EIN by its type
EIN + 023456789 → 02-3456789
Get the template →
Display a numeric EIN as 01-2345678
12345678 → 01-2345678
Get the template →
Turn a ten-digit NPI number into text
1234567890 as a number → 1234567890 as text
Get the template →
Merge a few test letters before the whole mailing
Whole mailing → records 2 to 4 only
Take this route →