Replace a given dialing prefix with a plus

Turn 0012015550123 into +12015550123 with the prefix your list uses. + numbers stay.

What you'll make

In Excel: 0012015550123 + 00 becomes +12015550123.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1LEFT(A8,1)="+",A8Keeps a number that already starts with +.Not used for row 8
2IF(B8="","Review missing prefix",Flags a row with no prefix.Not used for row 8
3IF(LEFT(A8,LEN(B8))=B8,Checks the number starts with the prefix.Yes
4"+"&MID(A8,LEN(B8)+1,99)Puts + in place of the prefix."+12015550123"
5IF( … )Tries each check in turn and uses the first that fits."+12015550123"

Any other number says Review dialing prefix. The result is text. The numbers here are made-up.

=IF(LEFT(A8,1)="+",A8,IF(B8="","Review missing prefix",IF(LEFT(A8,LEN(B8))=B8,"+"&MID(A8,LEN(B8)+1,99),"Review dialing prefix")))

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 numbers. Paste phone numbers and their dialing prefix into the green columns of the Template tab. The + numbers fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Paste numbers and prefixes as text so the leading zeros stay. Take out spaces and dashes first.

Microsoft's help: IF function