The MID function

Returns a number of characters from the middle of a text, starting at a given position.

Syntax

MID(text, start_num, num_chars)
text
The text to take characters from.
start_num
The position of the first character, from 1.
num_chars
How many characters to return.

Examples

C1=MID(A2,4,4)
ABC
1Code2100
2DK-2100

In plain words: Take 4 characters of the code in A2, starting at character 4.

C1=MID(A2,1,2)
ABC
1CodeDK
2DK-2100

Read the guide

Related functions