The MID function extracts a given number of characters from the middle of a supplied text string. For example, =MID(“apple”,2,3) returns “ppl”.
Purpose of Excel MID Function
Extract text from inside string.
Return value
The characters extracted.
Syntax
=MID (text, start_num, num_chars)
Arguments
Arguments | Description | Remarks |
text | The text from which to extract characters. | Mandatory |
start_num | The location of the first character to extract. | Mandatory |
num_chars | The number of characters to extract. | Mandatory |
Usage notes
- MID returns a specific number of characters from a text string, starting at start_num and continuing through start_num + num_chars.
- Use the MID function when you want to extract text from inside a text string, based on location and length.
- You can use FIND to locate start_num when you don’t know the location in advance.
Availability
Since 2007 for Windows.
Since 2011 for Mac.
Example
MID returns text from any start point of the cell (left to right)

In this example the given text in B4 is THE BAT IN THE MAT, here we have given input of start number as 5 and number of characters as 3 and the return value is bat.
BAT is located in 5th character of supplied text , even space is counted and total letters in bat is 3.
The formula used here is =MID(B4,C4,D4)
retrieving characters 5-7 in E4.
retrieving characters 16-18 in E5.
retrieving character 1-6 in E6.
Suggested reading: 20 Excel Functions Useful For Finance Professionals
1 Comment
Pingback: 20 Excel Functions Useful For Finance Professionals