MID function
Background

We may encounter a scenario where we want to extract something in-between from text. MID function does the text extration from anywhere from middle of the text.

Syntax
=MID(source_text,from_where,how_many)
1
2
3
source_text
Text / Cell address which contains the text

from_where
Position from which to start extracting text

how_many
Number of characters to extract from given position

Example

Suppose we want to extract Father's Name i.e. Salim from Salman Salim Khan.

1 2 3 4 5 6 7 8
S a l m a n   S a l i m   K h a n
1 2 3 4 5

It is clear from above table that word Salim starts from 8th position and it's length is 5 characters. So our MID function would be formulated as shown below:

excel mid function illustration
Note
  1. Space will also be counted as character
  2. Even if extracted text is number, still it gets converted into text
  3. Writing negative number in how_many does not results to extracting of character towards left hand side.
Related Articles
LEFT / RIGHT function
LEN function