Remove one identifier label at the start
Turn NPI: 1234567890 into 1234567890, and flag a cell with another label.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | LEFT(TRIM(A8),LEN(B8))=B8 | Checks the cell starts with the label, in any case. | Yes |
| 2 | TRIM(MID( … )) | Keeps what comes after the label. | "1234567890" |
| 3 | "Review prefix" | What the cell says when the label isn't there. | Not used for row 8 |
| 4 | IF( … ) | Uses part 2 when the label is there, otherwise part 3. | "1234567890" |
Read it left to right. The result is text, so leading zeros stay. The IDs here are made-up.
=IF(LEFT(TRIM(A8),LEN(B8))=B8,TRIM(MID(TRIM(A8),LEN(B8)+1,999)),"Review prefix")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 labeled ID and its label into the green columns of the Template tab. The IDs fill in by themselves.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
Type the label exactly as your file writes it, colon or # included.
Microsoft's help: MID function
OTHER ROUTES YOU MIGHT LIKE

Build a letter-reference code
AB + 123 → AB000123
Get the template →
Increment an internal prefixed sequence
AB000001 → AB000002
Get the template →
Read the numeric sequence from a code
AB000123 → 123
Get the template →
Merge a few test letters before the whole mailing
Whole mailing → records 2 to 4 only
Take this route →