Excel Function: MID

The Excel function MID retrieves the number of characters of your choice from a text string, starting at a position you specify.

Usage:

=MID(text, start_num, num_chars)


Example of use

The goal here is to retrieve the 4-digit number that is in the middle of the reference number:

excel function mid

To do this, select the MID function and enter:

=MID(A2,5,4)
mid function

The MID function successfully returns the 4 desired characters:

mid

Now all that's left to do is drag the formula down to complete the other cells:

excel function mid text