how to use excel mid functionExcel 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 & number of characters required.

Excel MID Function to Extract Specific Cell Characters

Syntax

MID(text,start_num,num_chars)

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 About 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.

Examples

Use Excel MID Function In DIfferent Ways to Extract Specific Cell Characters

In above example, I have used different values in function arguments for your better understanding.

  1. From 6th character to next 6 characters extracted.
  2. From 6th character to next 10 characters extracted.
  3. I have used starting character in negative & it has returned an error.
  4. By using 0 for the number of characters to extract & it has returned a blank.
  5. With negative number for the number of characters to extract & it has returned an error.
  6. Starting number is zero & it has returned an error.
  7. Text string directly into the function.

Sample File

download sample file to learn about excel mid function

What’s Next?

To learn more about Excel MID Function you can check Microsoft’s Help Section.

There are also some functions like LEFT | RIGHT which are highly useful with mid function.

Apart from this, I have a list of excel functions and some real life formulas examples.

And, if you have a unique idea to use mid function, I would love to hear from you.