Returns the specified number of characters from the specified text, starting at the specified position.
Syntax
![]() |
---|
MID( Text text, Integer start, Integer length ) → Text |
If start is less than or equal to 0, the function returns the #VALUE! error value. If start is greater than the number of characters in text, an empty string is returned. If length is negative, the function returns #VALUE!. If length specifies more characters than available, the function returns all characters from start to the end of text. If length is zero, an empty string is returned.
If start or length are not integer values, they are automatically truncated.
Formula
![]() |
---|
=MID(A2,1,5) |
Function Reference
LEFT Function
LEN Function
RIGHT Function
REPLACE Function
SUBSTITUTE Function
FIND Function
SEARCH Function