0PricingLogin
Excel Formulas Academy · Lesson

Pulling From the Middle With MID

Extract characters from any position inside a string using MID.

When the Data Is in the Middle

LEFT and RIGHT handle the edges of text, but what about characters buried in the middle?

Think of a code like US-4471-X where the four-digit number sits between two dashes. You cannot reach it from either end alone. For this you need the MID function.

The MID Function Takes Three Parts

MID needs three pieces of information:

  • The text (or a cell)
  • The start position — which character to begin at
  • How many characters to grab

Positions are counted from the left, starting at 1. So character 1 is the first letter, character 2 is the second, and so on.

=MID(text, start, count)

All lessons in this course

  1. Extracting Text With LEFT and RIGHT
  2. Pulling From the Middle With MID
  3. Measuring Text With LEN
  4. Cleaning Spaces With TRIM
← Back to Excel Formulas Academy