Keep only IDs of an approved type
Pass an ID through only when its type says NPI or TIN.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | OR(A8="NPI",A8="TIN") | Checks if the type is NPI or TIN. | Yes, it says NPI |
| 2 | B8 | The ID, unchanged. | "1234567890" |
| 3 | "Review ID type" | Shown for any other type. | Not used for row 8 |
| 4 | IF( … ) | Uses part 2 if part 1 says yes, else part 3. | "1234567890" |
Read it left to right. Capitals don't matter: npi counts too. The IDs here are made-up.
=IF(OR(A8="NPI",A8="TIN"),B8,"Review ID type")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 each ID's type label and the ID, stored as text, into the green columns of the Template tab. The approved IDs fill in by themselves.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
This trusts the type label. Check that each label really matches its ID before you paste.
Microsoft's help: IF function
OTHER ROUTES YOU MIGHT LIKE

Choose an NPI or a local fallback
1234567890 + 000123 → NPI: 1234567890
Get the template →
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 →
Merge a few test letters before the whole mailing
Whole mailing → records 2 to 4 only
Take this route →