Add an area code to a seven-digit phone

Turn 5550123 and 201 into 2015550123, using the area code you were given.

What you'll make

In Excel: 5550123 + 201 becomes 2015550123.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1AND(LEN(A8)=7,LEN(B8)=3)Checks for 7 digits and a 3-digit area code.Yes
2B8&A8Puts the area code in front of the number."2015550123"
3"Review number parts"What the cell says for any other lengths.Not used for row 8
4IF( … )Uses part 2 when part 1 says yes, otherwise part 3."2015550123"

The result is text, so no digits are lost. The numbers here are made-up.

=IF(AND(LEN(A8)=7,LEN(B8)=3),B8&A8,"Review number parts")

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 seven-digit numbers and their area codes into the green columns of the Template tab. The full 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 the seven digits without a dash. Use only the area code your records give for that person.