Kornilios Ampatzis/ April 19, 2019/ Functions

It returns a specific amount of characters from a string, starting at a specific position in the string.

The syntax of the function is the following:

MID(text, start_num, num_chars)

find_text: The text you from which the characters will come.
start_num: The position of the first character you want to extract in text.
num_chars: The number of characters that will be returned.

If the start_num argument is greater than the length of the text the function returns an empty string.

If (start_num+num_chars) is greater than the length of the text then the function returns the characters from start_num to the end of the text.

If start_num is less than 1 or num_chars is less than zero then the function returns the #VALUE! error.

Click on the button to practice using this function, with the help of our Online Assessment Tool:

Practice

Here is an example of how to use the MID function:

Display the second to fifth letter of the entries of the cell range A1:A20 in the respective cell range B1:B20.

Share this Post