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(1A2,24,34)| A | B | C | |
|---|---|---|---|
| 1 | Code | 2100 | |
| 2 | DK-2100 |
In plain words: Take 34 characters of 1the code in A2, 2starting at character 4.
C1=MID(A2,1,2)
| A | B | C | |
|---|---|---|---|
| 1 | Code | DK | |
| 2 | DK-2100 |