For the complete documentation index, see llms.txt. This page is also available as Markdown.

MID

The MID function returns a specified number of characters from a text string, starting at the position you specify. When used with a number, the function returns the result as text.

Syntax

MID(text, position, length)

Arguments

  • text: The text string that contains the characters to extract.

  • position: The starting position of the characters to extract.

  • length: The number of characters to return from the text.

Return value

Returns the specified number of characters from the text string.

Example

MID(Product Code, 8, 4)

In this example, the MID function extracts 4 characters from the Product Code field starting at position 8 to create a shorter product code. For example, Product0101001 returns 0101.

Excel equivalent

MID

Last updated

Was this helpful?