Increment an internal prefixed sequence

Turn AB000001 into AB000002, zeros kept, for your own internal codes.

What you'll make

In Excel: AB000001 becomes AB000002.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1LEFT(A8,2)Keeps the two letters at the start."AB"
2VALUE(RIGHT(A8,6))+1Reads the last six digits as a number and adds 1.2
3TEXT( … ,"000000")Writes it back as six digits, zeros in front."AB000002"

Read it left to right; part 3 works on part 2. The codes here are made-up.

=LEFT(A8,2)&TEXT(VALUE(RIGHT(A8,6))+1,"000000")

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 codes. Paste codes, stored as text, into the green column of the Template tab. The next codes 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 for your own internal codes. Never add one to an NPI, TIN or any ID someone else assigns.

Microsoft's help: TEXT function