Returns characters of a text string from the middle.
The Excel MID function extracts a specified number of characters from the middle of a given text string. For example, =MID(“number”,1,3) returns “num”.
=MID (text, start_num, num_chars)
text – The text that contains the characters
start_num – The first character to extract in the text
num_chars – Number of characters to return from the text after start_num
One or more characters of given text
- Use the LEFT and RIGHT function to extract a specific number of characters based on given leftmost and rightmost positions respectively.
- The MID function return number of characters including Start_num.
- If start_num is greater than the length of the text, MID function returns empty text.
- If start_num + num_chars exceeds the length of the text, then the return character is up to the end of the given string.