Remove a leading apostrophe from an ID

Turn '000123 from an export into 000123. Leading zeros stay.

What you'll make

In Excel: '000123 becomes 000123.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1LEFT(A8,1)=CHAR(39)Checks whether the first character is an apostrophe.TRUE
2MID(A8,2,999)Keeps everything from the second character on."000123"
3A8Otherwise keeps the ID as it is.Not used for row 8
4IF( … )Takes off one apostrophe, only at the start."000123"

CHAR(39) is the apostrophe. The IDs here are made-up.

=IF(LEFT(A8,1)=CHAR(39),MID(A8,2,999),A8)

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

Before you send

An apostrophe you type yourself to keep zeros isn't stored in the cell. This is for ones that came in with the export.

Microsoft's help: CHAR function