The MID function returns a sub-string from a string, starting from a specified location. In this guide, we’re going to show you how to use the Excel MID function and also go over some tips and error handling methods.


Supported versions

  • All Excel versions

Excel MID Function Syntax

MID(text, start_num, num_chars)


Arguments

text

The text that contains the sub-string you want to extract.

start_num

The position of the first character of the sub-string you want to extract.

num_chars

The number of characters you want to extract.



Examples

Example 1

=MID(“Charizard”,3,4)
 formula returns “ariz” as text value. The Excel MID function grabs the sub-string from the 3rd character to 4 more characters.

MID Example 1

Example 2

=MID(“Blastoise”,3,100)
formula starts from the 3rd position before “a” and returns the rest of the string. Use a large number for the num_chars parameter to return all characters after specified position. Unlike the LEFT and RIGHT functions, num_chars is a required argument in this formula.

MID Example 2

Download Workbook


Tips

  • Excel MID function will not extract number formatting characters like currency symbols or thousand separators.
  • Try the LEFT function to return a sub-string from right.
  • Try the RIGHT function return a sub-string from middle of a string.
  • You can use the SEARCH and FIND functions to locate the positions of characters.