MID returns a specific number of characters from a text string, starting at the position you specify, based on the number of characters you specify.
MID(text, startNumber, numberOfCharacters)
- text (Required) The text string containing the characters you want to extract.
- startNumber (Required) The position of the first character you want to extract in text. The first character in text has start_num 0, and so on.
- numberOfCharacters (Required) Specifies the number of characters you want MID to return from text.
If startNumber is greater than the length of text, MID returns "" (empty text).
If startNumber is less than the length of text, but startNumber plus numberOfCharacters exceeds the length of text, MID returns the characters up to the end of text.
Field 1: Fluid Flow
Returns 5 characters from the string in Field 1, starting at the 1st character.
Returns 20 characters from the string in Field 1, starting at the 7th character. Because the number of characters to return (20) is greater than the length of the string (10), all characters, beginning with the 7th, are returned. No empty characters (spaces) are added to the end.
Because the starting point is greater than the length (10) of the string, empty text is returned.
Updated over 1 year ago