Insert the EIN hyphen preserving zeroes

Turn nine EIN digits like 012345678 into 01-2345678, zero kept.

What you'll make

In Excel: 012345678 becomes 01-2345678.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1LEFT(A8,2)Takes the first two digits."01"
2&"-"&Adds a hyphen after them."01-"
3RIGHT(A8,7)Adds the last seven digits."01-2345678"

Read it left to right. The digits stay text, so a leading zero like the 0 in 012345678 stays. The EINs here are made-up.

=LEFT(A8,2)&"-"&RIGHT(A8,7)

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 IDs. Paste EIN digits, stored as text, into the green column of the Template tab. The EINs with hyphens fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Use this only on cells that hold all nine digits as text. A number that lost its zero comes out wrong.

Microsoft's help: LEFT function