logo
excelfunctions.org
bookmarks

MID

Returns a specific number of characters from a text string starting at the position you specify.

TextBeginner EssentialsMost UsedText Processing

What it does

Returns characters from the middle of a text string, given a start position and length.

Syntax

MID(text, start_num, num_chars)

Arguments

  • text(text) β€” Text to extract from.
  • start_num(number) β€” 1-based position to start extracting.
  • num_chars(number) β€” Number of characters to extract.

Examples

Extract a middle segment

Extract the 3-letter code from A2.

FORMULA
=MID(A2,5,3)
RESULT
NYC
SAMPLE DATA
A
1Text
2ID-NYC-77
3ID-LAX-18