Google Sheets MID function

Returns characters from the middle of a text, starting at a position. In Spanish Sheets it is called EXTRAE.

Syntax

English Sheets

=MID(string, starting_at, extract_length)

Spanish Sheets (Mexico locale)

=EXTRAE(cadena, posición_inicial, número_caracteres)

Spanish Sheets (Spain, Latin America)

=EXTRAE(cadena; posición_inicial; número_caracteres)

ArgumentWhat it is
stringThe text or cell.
starting_atWhere to start, counting from 1.
extract_lengthHow 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 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 Google Sheets it is EXTRAE. The formula =MID(A2,5,2) is written =EXTRAE(A2;5;2) (or with commas under a Mexico locale).
Why does MID use semicolons in some spreadsheets?
It depends on each spreadsheet's locale, under File > Settings. Where the comma is the decimal mark (Spain, much of South America), arguments are separated by semicolons. Mexico and United States locales use commas.
What is the most common MID mistake?
In Spanish it is EXTRAE. The first position is 1, not 0.