MID Function
Description
Extract the specified number of characters from the specified position in the string value.
The function requires three arguments.
- Argument 1: Specify the original string.
- You can use either a string or a number. Specifying other data types will result in an error.
- Argument 2: Specify the extraction start position as a number.
- Set the leftmost position to zero. A negative number causes an error.
- Argument 3: Specify the number of characters to extract.
- If you specify a number less than or equal to zero, the result is an empty string.
Usage Examples
In the following example, the result is “you”.
= mid ("Do you want 🍵 or ☕?", 3, 3)
Restrictions
- Internet Explorer 11 is not supported.