MID

Formula Explanation

Retrieves a specific number of characters from a text string, starting from a specified position. The number of characters to retrieve is specified by the user.

Formula Syntax

Result column input: MID(text / column number, starting position, number of characters)

The MID function syntax has the following arguments:

  • Text / column number is required. It is the text string that contains the characters to be extracted.

  • Starting position is required. It is the position of the first character to be extracted from the text.

    • The starting position of the first character in the text is 1, and so on.

    • If the starting position is greater than the length of the text, MID returns an empty string ("").

    • If the starting position is less than the length of the text, but the starting position plus the number of characters exceeds the length of the text, MID returns the characters until the end of the text.

  • Number of characters is optional. It specifies the number of characters to be returned from the text.

Usage Example

Retrieve the content of 5 characters starting from the 7th position of column DL2 and write the result in column DL3.

DL3 = mid(DL2,7,5)

mid

Last Updated: