Excel MID Function can help you to extract a specified number of characters from a text, starting from a specified position.
In simple words, you can specify that how many characters you want to extract, starting from a particular position.
In below example, I have used mid to extract “Champs” from “ExcelChamps.com” by the specifying position of the first letter of required text string and the number of characters required.
- text A text or number from which you want to extract some characters.
- start_char Position of character from where you want to extract characters.
- num_chars Number of characters you want to extract from the start_char.
More Information on Excel MID Function
- You can’t specify start_char less than 1. If you do, it will return an error.
- If you specify num_chars as 0, it will return nothing & if you specify it as a negative number it will return an error.
- You can’t refer to more than one cell. If you do that it will return the characters from the top right cell of the range.
- If the start_char is greater than the length of the text, then it will return and blank.
In the below example, I have used different values in function arguments for your better understanding.
- From 6th character to next 6 characters extracted.
- From 6th character to next 10 characters extracted.
- I have used starting character in negative and it has returned an error.
- By using 0 for the number of characters to extract & it has returned a blank.
- With negative number for the number of characters to extract & it has returned an error.
- Starting number is zero and it has returned an error.
- Text string directly into the function.
To learn more about Excel MID Function you can check Microsoft’s Help Section. And, if you have a unique idea to use it, I would love to hear from you.
There are also you have LEFT | RIGHT functions which are highly useful. Apart from this, I have a list of excel functions and some real life formulas examples.