Examples
The formula below returns 3 characters starting at the 5th character: This formula will extract 3 characters starting at character 16: If num_chars is greater than remaining characters, MID will all remaining characters: MID can extract text from numbers, but the result is text:
Related functions
Use the MID function to extract from the middle of text. Use the LEFT function to extract text from the left side of a text string and the RIGHT function to extract text starting from the right side of text. The LEN function returns the length of text as a count of characters. Use FIND or SEARCH to locate an unknown start position.
Notes
num_chars is optional and defaults to 1. MID will extract text from numeric values, but the result is text Number formatting is not counted or extracted.
Dave Bruns
Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.