MID Function (VisioShapeSheet)
Returns a specific number of characters from a text string, starting at the position you specify, based on the number of characters you specify.
Syntax
MID (text, start_num, num_chars )
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
text |
Required |
String |
The text string that contains the characters you want to extract. |
start_num |
Required |
Number |
The position of the first character you want to extract. The first character in the text string is position 1. |
num_chars |
Required |
Number |
The number of characters to return. |
Return value
String
Remarks
If start_num is:
Greater than the length of text, MID returns "" (empty text).
Less than the length of text, but start_num plus num_chars exceeds the length of text, MID returns the characters up to the end of text.
Less than 1, MID returns the #VALUE! error value.
If num_chars is negative, MID returns the characters in text string.
Example
MID ("SSN 999-99-9999",5,11)
Returns 999-99-9999.