Saltar al contenido
GridBelt
  • Prueba de Excel
  • Práctica
  • Programas
  • Precios
Iniciar sesión
Empezar la prueba gratuita
  • Prueba de Excel
  • Práctica
  • Programas
  • Precios
Iniciar sesiónCrear cuenta
Empezar la prueba gratuita
GridBelt

Practica Excel en tu navegador.

Prueba de Excel

  • Nivel 1: Principiante
  • Nivel 2: Intermedio
  • Nivel 3: Experto
  • Prueba de Excel en 7 días
  • Clasificación
  • Prueba de Excel para entrevistas
  • Evaluación de Excel de Indeed

Práctica

  • Todos los ejercicios
  • Programas
  • Para principiantes

Guías

  • Fórmulas de Excel
  • Atajos de Excel

Empresa

  • Acerca de
  • Precios
  • Cómo corregimos

© GridBelt. Todos los derechos reservados.

  • Política de privacidad
  • Términos de uso
  • Política de reembolso

Excel es una marca comercial de Microsoft Corporation. Indeed, TestGorilla, SHL y otras marcas son propiedad de sus respectivos titulares. GridBelt es un sitio de práctica independiente y no está afiliado a Microsoft, TestGorilla, SHL ni Indeed, ni respaldado ni patrocinado por ellos.

  1. Práctica
  2. /
  3. Text functions

TRIM and PROPER practice: clean 120 customer names typed by hand

  • Intermedio
  • ~6 min
  • Text functions

Enunciado en inglés

120 customers typed their own names into the web-shop checkout, and the export shows it: 69 names carry spaces before or after, 51 have two or three spaces between first and last name, and 101 are all lower case, ALL CAPS or randomly capitalised. B2 alone reads "··JEAN-LUC··JACKSON·" (· marks a space). Produce a clean "First Last" version of every name in C2:C121 — single spaces, capital first letters — ready for the mailing labels.

Qué tienes que hacer

  1. 1Click C2 and type =TRIM(B2): TRIM removes the spaces before and after the text and squeezes every run of spaces inside it to a single space. C2 now shows "JEAN-LUC JACKSON".
  2. 2Wrap it in PROPER: =PROPER(TRIM(B2)). PROPER capitalises the first letter of each word and lower-cases the rest — C2 reads Jean-Luc Jackson.
  3. 3Fill C2 down to C121 (double-click the fill handle, or select C2:C121 and press Ctrl+D on Windows / ⌘D on Mac).
  4. 4Check a few rows with punctuation, e.g. Hugo O'Neil (row 66) and Jean-Luc Jackson (row 2): the letter after an apostrophe or a hyphen is capitalised too — that is how PROPER works.

Celdas de respuesta

Corrección

Escribe tu fórmula en la cuadrícula, presiona Enter y luego haz clic en Comprobar. Evaluamos el valor de cada celda de respuesta y la fórmula que lo produce.

Tareas

  1. Sin comprobarIn C2, clean the name in B2 with TRIM and PROPER — remove the extra spaces and capitalise each word — then fill down to C121.

Para las tareas de hoja de cálculo se recomienda una pantalla grande. La hoja se desplaza dentro de este recuadro.

StartInsertFormulasDataView
A1fxPreparando tu libro…
A
B
C
D
E
F
G
H
I
J
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Sheet1

Escribe tu fórmula en la hoja y luego comprueba.

Sobre este ejercicio

Un conjunto de datos de 120 filas en una hoja, una celda de respuesta, unos 6 minutos. Se corrige en tu navegador: el valor y la fórmula que lo produce, con comentarios que te dicen qué arreglar.

Cómo resolverlo

  • C2=PROPER(TRIM(B2))

TRIM removes all spaces from a text except single spaces between words: leading and trailing spaces disappear and "JEAN-LUC···JACKSON" becomes "JEAN-LUC·JACKSON". PROPER then capitalises the first letter of every word and makes all other letters lower case, so lower-case, ALL-CAPS and randomly cased entries all end up as "First Last". Nesting them — PROPER(TRIM(B2)) — applies both fixes in one cell, and the check is strict about case: "jean-luc jackson" would not count.

Pitfall 1: PROPER alone leaves the doubled inner spaces, and the grader compares the text exactly — 51 of the 120 rows would fail; TRIM alone leaves the wrong case. Both are needed. Pitfall 2: PROPER capitalises after every non-letter, so "o'neil" becomes O'Neil (fine) but "mcdonald" becomes Mcdonald and "iPhone" becomes Iphone — review names with internal capitals by hand or fix them with SUBSTITUTE. Pitfall 3: TRIM only removes the normal space, CHAR(32). Web forms and copied web pages often contain the non-breaking space CHAR(160), which TRIM ignores in Excel; use TRIM(SUBSTITUTE(B2,CHAR(160)," ")) for those, and CLEAN for line breaks and other non-printing characters. Flash Fill (Ctrl+E) or Text to Columns can fix one export quickly but leave static values; the formula keeps cleaning new rows. To compare cleaned names with another list safely, also apply LOWER or use EXACT only after both sides are cleaned the same way.

Otras formas válidas

  • =TRIM(PROPER(B2)) — same result, functions nested the other way round
  • =PROPER(TRIM(SUBSTITUTE(B2,CHAR(160)," "))) — also handles non-breaking spaces from web forms
  • =PROPER(TRIM(CLEAN(B2))) — additionally strips line breaks and other non-printing characters

Errores frecuentes

Using PROPER without TRIM: =PROPER(B2) returns "··Jean-Luc··Jackson·" (· marks a space) — capitalised, but with the padding and the doubled space still there.

Cómo corregimos

Se acepta cualquier fórmula que produzca el resultado correcto, salvo que la tarea nombre una función: entonces otra función obtiene media puntuación. Comparamos los valores con una pequeña tolerancia y, en el texto, ignoramos mayúsculas y espacios. Un número correcto escrito a mano en lugar de una fórmula obtiene media puntuación. Las tareas de varias celdas obtienen la puntuación completa con el 100% de las celdas correctas y media puntuación desde el 50%. Cuando importa, también cambiamos una celda de entrada en una copia de tu hoja y comprobamos que tu fórmula se adapta.

Respuestas calculadas con las reglas de Excel 365 y comprobadas en nuestro corrector el 16 de noviembre de 2026. Autor: GridBelt team.

En estos programas

  • Excel test in 7 days, Plan del nivel 2Día 4
  • Excel test in 7 days, Plan del nivel 3Día 3
  • Excel for Data AnalystsDía 5

Ejercicios relacionados

  • Full name with CONCAT or &Principiante, ~4 min
  • Split email into user and domain (FIND/LEFT/RIGHT or TEXTBEFORE/TEXTAFTER)Intermedio, ~7 min
  • Turn text dates into real dates and group by monthExperto, ~12 min

Referencia de la función

Documentación oficial

Siguiente ejercicio

Combine tags per product with TEXTJOIN