Skip to content
Dropfile

MID Function

Extracts a specific number of characters from the middle of a text string, starting at any position.

ExcelGoogle Sheets

Sintaxis

MID(text, start_num, num_chars)

Parámetros

ParámetroDescripción
textThe text string or cell reference.
start_numThe position of the first character to extract (1-based).
num_charsThe number of characters to extract.

Ejemplos

Extract middle portion of a code

=MID("ABC-1234-XY", 5, 4)

Resultado: 1234

Extract month from a date string

=MID("2024-03-15", 6, 2)

Resultado: 03

Consejos y buenas prácticas

Fórmulas relacionadas

¿Necesitas otra fórmula?

Describe lo que necesitas en texto simple y nuestra IA generará la fórmula por ti.

Probar el Generador de fórmulas