Home › Functions › Text › MID
fx
MID
Text  ·  Since: Excel 2003  ·  9 languages

MID returns a specific number of characters from a text string, starting at the position you specify, based on the number of characters you specify.

🌐 Translations

English MID
Deutsch TEIL
Français STXT
Español EXTRAE
Italiano STRINGA.ESTRAI
Português EXT.TEXTO
Nederlands DEEL
Polski FRAGMENT.TEKSTU
Русский ПСТР

📦 Availability

Excel versionAvailable
Excel 2007 ✓
Excel 2013 ✓
Excel 2019 ✓
Excel 2021 ✓
Microsoft 365 ✓
Translate a formula with this function
fx EN
fx DE

⌨ Syntax

MID(text,start_num,num_chars)

Arguments

text (required) — The text string containing the characters you want to extract.
start_num (required) — The position of the first character you want to extract in text. The first character in text has start_num 1, and so on. If start_num is greater than the length of text, MID returns "" (empty text). If start_num is less than the length of text, but start_num plus num_chars exceeds the length of text, MID returns the characters up to the end of text. If start_num is less than 1, MID returns the #VALUE! error value.
num_chars (required) — Specifies the number of characters you want MID to return from text.

▶ Examples

=MID(A2,1,5)
=MID(A2,7,20)
=MID(A2,20,5)

Related functions

Copied to clipboard