MID

Returns characters of a text string from the middle in Excel
Return middle characters of a text strings

Rational

Returns characters of a text string from the middle.

Description

The Excel MID function extracts a specified number of characters from the middle of a given text string. For example, =MID(“number”,1,3) returns “num”.

Syntax

=MID (text, start_num, num_chars)

Parameters

text – The text that contains the characters
start_num – The first character to extract in the text
num_chars – Number of characters to return from the text after start_num

Return Value

One or more characters of given text

Key Notes

  • Use the LEFT and RIGHT function to extract a specific number of characters based on given leftmost and rightmost positions respectively.
  • The MID function return number of characters including Start_num.
  • If start_num is greater than the length of the text, MID function returns empty text.
  • If start_num + num_chars exceeds the length of the text, then the return character is up to the end of the given string.

Keep Reading Similar Functions:

Returns characters from the left side of a text string in Excel

LEFT

The LEFT function display number of characters specified in the argument of text starting from the left. I.e., LEFT(“Excel LEFT function”,5) returns “Excel”.

Read More »
Change the format of a number and converts it to text in Excel

TEXT

The TEXT function allows converting a value to a specific format based on the given format codes. E.g. =TEXT(31-12-2018,”MM/DD/YYYY”) return ” 12/31/2018″.

Read More »
Get rightmost characters from a text in Excel

RIGHT

The Excel RIGHT function extract rightmost characters based on the specified number. I.e., =RIGHT(“String”,4) returns “ring”.

Read More »