Excel MID function
Returns characters from the middle of a text, starting at a position. In Spanish Excel it is called EXTRAE.
Syntax
English Excel
=MID(text, start_num, num_chars)
Spanish Excel (Mexico)
=EXTRAE(texto, posición_inicial, núm_de_caracteres)
Spanish Excel (Spain, Latin America)
=EXTRAE(texto; posición_inicial; núm_de_caracteres)
| Argument | What it is |
|---|---|
| text | The text or cell. |
| start_num | Where to start, counting from 1. |
| num_chars | How many characters to take. |
Example
MID(text, start, n) takes n characters beginning at position start. In a Mexican CURP ID, characters 5 and 6 are the last two digits of the birth year.
=MID(A2,5,2)
Common mistake
In Spanish Excel it is EXTRAE. The first position is 1, not 0.
About Ads
This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.
Ads help us keep WebHerramientas free for everyone
Practice MID
Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons
MID
MID(text, start, n) takes n characters beginning at position start. In a Mexican CURP ID, characters 5 and 6 are the last two digits of the birth year.
In B2, extract the two birth-year digits (positions 5 and 6).
| A | B | C | |
|---|---|---|---|
| 1 | CURP (sample) | Year | |
| 2 | GOMA850312HDFRRN09 | ||
| 3 | LOPS921104MJCPNF02 | ||
| 4 | HERJ000725HNLRSS05 | ||
| 5 | MART781218MPLRRL01 | ||
| 6 | SAVD050601HYNNLG07 | ||
| 7 |
Tip: while typing, click a cell or drag across several to insert their reference.
Frequently asked questions
- What is MID called in Spanish?
- In Spanish Excel it is EXTRAE. The formula =MID(A2,5,2) is written =EXTRAE(A2;5;2) (or with commas in Mexico).
- Why does MID use semicolons in some Excel versions?
- It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
- What is the most common MID mistake?
- In Spanish Excel it is EXTRAE. The first position is 1, not 0.