Get a phone number from a tel link

Turn tel:+12015550123;ext=12 into +12015550123, and flag anything else.

What you'll make

In Excel: tel:+12015550123;ext=12 becomes +12015550123.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1LEFT(LOWER(A8),5)="tel:+"Checks if the cell starts with tel:+, in any capitals.TRUE
2MID(A8,5,999)&";"Drops tel: and adds a ; at the end."+12015550123;ext=12;"
3TEXTBEFORE( … ,";")Keeps the text before the first ;."+12015550123"
4"Review tel link"What the cell says for anything else.Not used for row 8
5IF( … )Gives part 3 for a tel:+ link, otherwise part 4."+12015550123"

Parts 2 and 3 work from the inside out. The added ; covers links with no extension. The numbers here are made-up.

=IF(LEFT(LOWER(A8),5)="tel:+",TEXTBEFORE(MID(A8,5,999)&";",";"),"Review tel link")

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

Before you send

The extension is left out. Keep the original cell if your letter needs the extension too.

Microsoft's help: TEXTBEFORE function