MID(), MIDB()

Syntax

  • MID(text,start_num,num_chars)

  • MIDB(text,start_num,num_bytes)

Definition. The MID() function returns characters from the middle of a text string. The length of the character string is indicated by num_chars, and the starting position for the search is start_num. Use MIDB() for double-byte characters.

Arguments

  • text (required). The string from which the characters are to be extracted

  • start_num (required). The starting position for the character string to be extracted

  • num_chars/num_bytes (required). Specifies how many characters/bytes to return from text

Background. Use the MID() function to return characters from the middle of a string. You can enter letters or numbers in the text argument. The MID(), LEFT(), and RIGHT() functions are ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.