MID Function - Excel


Overview


The MID function in Excel is a useful tool for extracting a specific number of characters from a text string, starting at a specified position. It allows you to retrieve a substring from a larger text substring.

An example of the MID function in Excel

Example:

=MID("Elephant", 3, 3)

Syntax:

=MID(text, start_num, num_chars)

text: This is the text string from which you want to extract characters.

start_num: This is the starting position in the text from which to begin extracting characters.

num_chars: This is the number of characters to extract from the text.


Example


In this example, the MID function takes in the word “Hiking” and we start the character extraction in the 3rd letter (start_num). Now technically we are only pulling from the word “king” since that is where the 3rd character starts. Then we are returning the first 2 characters (num_chars) from there. The final output is the string “ki”.

Another example of the MID function in Excel

Interactive GSheet