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)

ArgumentWhat it is
textThe text or cell.
start_numWhere to start, counting from 1.
num_charsHow 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.

Advertising
Loading ad...

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.

Example=MID(A2,5,2)EXTRAE = MID

In B2, extract the two birth-year digits (positions 5 and 6).

B2
ABC
1CURP (sample)Year
2GOMA850312HDFRRN09
3LOPS921104MJCPNF02
4HERJ000725HNLRSS05
5MART781218MPLRRL01
6SAVD050601HYNNLG07
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.