MID Function Generator
MID returns a substring from any starting position in a text string. Ideal for extracting middle sections of fixed-format IDs or codes.
Syntax
=MID(text, start_num, num_chars)Try it — generate a MID formula
Examples
Get month from YYYY-MM-DD
=MID(A2, 6, 2)Starts at position 6 and returns 2 characters — the month.
Middle section of an ID code
=MID(A2, 4, 5)Chars 4–8 from a structured identifier.
Nth character
=MID(A2, 3, 1)Single character at position 3.
Tips
- ✓Position is 1-based: MID(text, 1, n) is equivalent to LEFT(text, n).
- ✓If start_num is past the end of the string, returns empty.
- ✓Pair with FIND to extract between two delimiters.
Related Formulas
LEFT
LEFT returns the first N characters from a text string. Useful for extracting pr...
RIGHT
RIGHT returns the last N characters of a text string. Common for grabbing file e...
FIND
FIND returns the starting position of one text string inside another. Case-sensi...
Need a different formula?
Describe any formula in plain English and FormulaPad will generate it.
Try FormulaPad Free