MID
Text
Returns a specific number of characters from a text string, starting at a position you specify.
Translations
EnglishMID
FrenchSTXT
SpanishEXTRAE
GermanTEIL
ItalianSTRINGA.ESTRAI
PortugueseEXT.TEXTO
DutchDEEL
PolishFRAGMENT.TEKSTU
RussianПСТР
TurkishPARÇAAL
CzechČÁST
HungarianKÖZÉP
SwedishEXTEXT
DanishMELLEMTEGN
FinnishPOIMI.TEKSTI
Syntax
MID(text, start_num, num_chars)Arguments
textThe text stringstart_numPosition to start (first character is 1)num_charsNumber of characters to extract
Examples
=MID("Hello World",7,5)World
Starts at position 7, takes 5 chars
=MID(A1,2,3)3 chars from pos 2
Extracts from position 2
=MID("ABC-123-XYZ",5,3)123
Extracts the middle part
Tips & Best Practices
- •First character is position 1, not 0
- •Returns empty if start_num exceeds text length
- •Use with FIND to locate the start position
Common Mistakes
- •Miscounting the starting position - MID starts counting from 1, not 0, so off-by-one errors are common
- •Using a fixed length when the segment being extracted actually varies from row to row
- •Forgetting MID returns text, so a numeric substring still needs VALUE() before you can do math with it
Related Functions
Frequently Asked Questions
How do I extract text between two characters, like parentheses?
Use FIND to locate both characters and calculate the length: =MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1).
What happens if the length I specify goes past the end of the text?
MID just returns whatever characters are available up to the end - it won't throw an error.
Can MID handle a variable start position?
Yes - the start_num argument can be any formula, like FIND() or SEARCH(), not just a fixed number.
Need to translate a formula using MID?
Use our translator to convert your complete formula
