Choose an NPI or a local fallback

Write NPI: 1234567890, or Local ID: 000123 when the NPI is blank.

What you'll make

In Excel: 1234567890 + 000123 becomes NPI: 1234567890.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1A8<>""Checks that the NPI cell isn't empty.TRUE
2"NPI: "&A8Writes NPI: and the NPI."NPI: 1234567890"
3IF(B8<>"", … )Otherwise writes Local ID: and the local ID.Not used for row 8
4IF( … )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.

  1. See it work. The Example tab shows 20 made-up examples with the formula already in.
  2. 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.
  3. 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