Write a local tel: link with phone context

Turn 7042 and example.com into tel:7042;phone-context=example.com.

What you'll make

In Excel: 7042 + example.com becomes tel:7042;phone-context=example.com.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1OR(A8="",B8="")Checks if the number or the context is empty.No, both are filled
2"Review local phone/context pair"Shown when the number or the context is missing.Not used for row 8
3"tel:"&A8Starts the link with tel: and the local number."tel:7042"
4&";phone-context="&B8Adds the label and the context after it."tel:7042;phone-cont…"
5IF( … )Uses part 2 if part 1 finds a gap, else parts 3 and 4."tel:7042;phone-cont…"

Read it left to right. The numbers and contexts here are made-up.

=IF(OR(A8="",B8=""),"Review local phone/context pair","tel:"&A8&";phone-context="&B8)

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

Before you send

Use the phone context your phone system names for each number. The formula won't add a country code.