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
- Extracting Text With LEFT and RIGHT
- Pulling From the Middle With MID
- Measuring Text With LEN
- Cleaning Spaces With TRIM