MID

Returns a specified number of characters from a text, starting at a specified position

Usage

MID(text, start_position, num_chars)

Parameters

text

(Required) The text from which to extract characters.

start_position

(Required) The starting position from which to begin extracting characters.

num_chars

(Required) The number of characters to extract from the text.

Examples

Example With these variables Result

MID(“Anna Logwatch”, 6, 3)

(None)

“Log”

MID(name, 6, 6)

name is "Anna Logwatch"

“Logwat”

More information

The MID function extracts a specified number of characters from a text, starting at a specified position (start_position).

If the start_position is greater than the length of the text, an empty string is returned.

If num_chars extends beyond the end of the text, the remaining characters until the end of the text are returned.

See also