Description
Returns the specified number of characters from a text string, beginning with the specified starting position.
Syntax
MID ( text, start_position, num_chars )
Parameter | Description |
---|---|
text | Any text string. |
start_position |
Character to return.
|
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:
MID("Travel Expenses", 8, 8)
This function returns 45:
MID("Part #45-7234", 7, 2)
See also