Description Returns the specified number of characters from a text string, beginning with the specified starting position.
Syntax MID ( text, start_position, num_chars )
Argument | Description |
---|---|
text | The string from which to return characters. |
start_position | The position of the first character to return from text. If start_position is 1, the first character in text is returned.If start_position is greater than the number of characters in text, an empty string ("") is returned.If start_position is less than 1, #VALUE! is returned. |
num_chars | The number of characters to return. If num_chars is negative, #VALUE! is returned. |
Remarks
If start_position plus the number of characters in num_chars exceeds the length of text, the characters from start_position to the end of text are returned.
Examples This function returns Expenses:
This function returns 45:
See Also CODE, FIND, LEFT, RIGHT, SEARCH