Overall, the MID worksheet function in Excel returns the characters from the middle of a text string, given a starting position and length.
MID worksheet function
Here is the syntax of the MID function.
Syntax
=MID(Text, Start_num, Num_chars)
Arguments
Below are the arguments of the MID function.
Argument | Description |
---|---|
Text | A text string from which you want to extract characters. |
Start_num | A number representing the position of the first character to extract. The first character of Text is 1. |
Num_chars | A number specifying how many characters to return from Text. |
Example(s)
Example 1
Example 2
If you want to get all the characters after a certain position, then you can use a function like:
=MID(A2, 5, 3000)
Basically, you put a super huge number for the Num_chars argument. As a result, this ensures that all characters in Text are shown.
Example 3
So, the above example shows you how you can extract each character from a string. All in all, it uses the number from the top row as the Start_num. Below is the function we use in the above screenshot.
=MID($A2,B$1,1)