



Al pegar o importar datos tenemos que extraer caracteres de una celda Excel, te mostramos todos los métodos.

3 PRIMEROS CARACTERES
Ir a: Celda D1
Escribir:
=IZQUIERDA(ESPACIOS(A1);3)O también: =IZQUIERDA(A1;3)
Mostrará: N.I
3 ÚLTIMOS CARACTERES
Ir a: Celda D2
Escribir:
=DERECHA(A1;3)O también: =DERECHA(ESPACIOS(A1);3)
O también: =EXTRAE(A1;LARGO(A1)-2;4)Mostrará: aña.
PENÚLTIMO CARACTER
Ir a: Celda D3
Escribir:
=EXTRAE(A1;LARGO(A1)-1;1)Mostrará: a.
PRIMERA PALABRA
Ir a: Celda D4
Escribir:
=IZQUIERDA(A1;ENCONTRAR(" ";A1)-1)Mostrará: N.I.F.
ÚLTIMA PALABRA
Ir a: Celda D5
Escribir:
=DERECHA(A1;ENCONTRAR(" ";A1)*1)O también: =DERECHA(A1;HALLAR(" ";A1;HALLAR(" ";A1;1)+0))
O también: =DERECHA(A1;HALLAR(" ";A1;1))Mostrará: Ciudad.
2 PRIMERAS PALABRAS
Ir a: Celda D6
Escribir:
=IZQUIERDA(A1;HALLAR(" ";A1;HALLAR(" ";A1;1)+1))O también: = ESPACIOS(IZQUIERDA(SUSTITUIR(A1;" ";REPETIR(" "; 100));200))
Mostrará: N.I.F. 12345678S.
3 PRIMERAS PALABRAS
Ir a: Celda D7
Escribir:
=IZQUIERDA(A1;ENCONTRAR("^";SUSTITUIR(A1 & " "; " "; "^"; 3)) - 1)Mostrará: N.I.F. 12345678S -.
3 ÚLTIMAS PALABRAS
Ir a: Celda D8
Escribir:
=ESPACIOS(DERECHA(SUSTITUIR(ESPACIOS(A1);" ";REPETIR(" ";60));180))Mostrará: - Residencia. Ciudad.
4ª PALABRA
Ir a: Celda D9
Escribir:
=ESPACIOS(EXTRAE(SUSTITUIR(A1;" ";REPETIR(" ";LARGO(A1)));(4-1)*LARGO(A1)+1;LARGO(A1)))O también: =EXTRAE (EXTRAE (EXTRAE (SUSTITUIR (A1;" "; "^";3); 1;256); ENCONTRAR("^"; SUSTITUIR(A1;" ";"^";3 ));256) ;2;ENCONTRAR (" ";EXTRAE (EXTRAE(SUSTITUIR (A1;" ";"^";3) ;1;256) ;ENCONTRAR ("^";SUSTITUIR (A1;" ";"^" ;3)); 256)) -2)
Mostrará: Apellidos.
DESDE LA 1ª PALABRA HASTA "-"
Ir a: Celda D10
Escribir:
=IZQUIERDA(A1;HALLAR("-";A1)-1)Mostrará: N.I.F. 12345678S.
DESDE CARACTER "-" HASTA EL FINAL
Ir a: Celda D11
Escribir:
=EXTRAE(A1;ENCONTRAR("-";A1)+1;256)O también: =DERECHA(A1;LARGO(A1)-HALLAR("-"; A1))
Mostrará: Apellidos y Nombre - Residencia. Ciudad.
SEGÚN NÚMERO DE CARACTERES
Extraer 10 caracteres a partir de la posición 8.
Ir a: Celda D12
Escribir:
=EXTRAE(A1;8;10)O también: =ESPACIOS(EXTRAE(SUSTITUIR(A1;" ";REPETIR(" ";99));100;99))
Mostrará: 12345678S.
TODO EXCEPTO LA PRIMERA PALABRA
Ir a: Celda D13
Escribir:
=EXTRAE(A1;HALLAR(" ";A1;1)+1;LARGO(A1))Mostrará: 12345678S - Apellidos y Nombre - Residencia. Ciudad.
EXTRAER NÚMEROS
Ir a: Celda D14 / Escribir:
=EXTRAE(A1;MIN(SI.ERROR(ENCONTRAR({0\1\2\3\4\5\6\7\8\9};A1);""));CONTAR(1*EXTRAE(A1;FILA($1:$101);1)))Pulsar la tecla F2, para editar la fórmula / Pulsar la tecla Control y mantenerla pulsada / Pulsar la tecla Mayús. y mantener las 2 teclas pulsadas / Pulsar la tecla Enter. Insertará la fórmula entre llaves como matricial {=EXTRAE (A1;MIN (SI.ERROR (ENCONTRAR ({0\1\2\3\4\5\6\7\8\9} ;A1); "")); CONTAR( 1*EXTRAE (A1;FILA ($1:$101) ;1)))}
Mostrará: 12345678.

- Consultar:
Buen dia si fuera tan amable cuanto saldrá un. Libro de Excel
Hola Israel,
Gracias por tu comentario, todo se andará. Realmente el la web hay mucha más información que en un libro y tenemos un trato más directo.
Saludos.
Hola. Gracias por los tips.
Por si sirve de algo, recién descubrí la función UNIRCADENAS.
Para el ejemplo mencionado usaríamos =UNIRCADENAS(" ";VERDADERO;A1:C1)
Saludos