Pular para o conteúdo
GridBelt
  • Teste de Excel
  • Prática
  • Programas
  • Preços
Entrar
Começar o teste gratuito
  • Teste de Excel
  • Prática
  • Programas
  • Preços
EntrarCriar conta
Começar o teste gratuito
GridBelt

Pratique Excel no seu navegador.

Teste de Excel

  • Nível 1: Iniciante
  • Nível 2: Intermediário
  • Nível 3: Avançado
  • Teste de Excel em 7 dias
  • Ranking
  • Teste de Excel para entrevista
  • Avaliação de Excel da Indeed

Prática

  • Todos os exercícios
  • Programas
  • Para iniciantes

Guias

  • Fórmulas do Excel
  • Atalhos do Excel

Empresa

  • Sobre nós
  • Preços
  • Como corrigimos

© GridBelt. Todos os direitos reservados.

  • Política de Privacidade
  • Termos de Uso
  • Política de Reembolso

Excel é uma marca comercial da Microsoft Corporation. Indeed, TestGorilla, SHL e outras marcas pertencem aos seus respectivos proprietários. O GridBelt é um site de prática independente e não tem afiliação com Microsoft, TestGorilla, SHL ou Indeed, nem é endossado ou patrocinado por eles.

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

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

  • Intermediário
  • ~6 min
  • Text functions

Enunciado em 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.

O que você precisa fazer

  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.

Células de resposta

Correção

Digite sua fórmula na grade, pressione Enter e depois clique em Verificar. Avaliamos o valor de cada célula de resposta e a fórmula por trás dele.

Tarefas

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

Recomendamos um computador para as tarefas de planilha. A planilha rola dentro desta caixa.

StartInsertFormulasDataView
A1fxPreparando sua pasta de trabalho…
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

Digite sua fórmula na planilha e depois verifique.

Sobre este exercício

Um conjunto de dados de 120 linhas em uma planilha, uma célula de resposta, cerca de 6 minutos. Corrigido no seu navegador: o valor e a fórmula por trás dele, com feedback que mostra o que corrigir.

Como resolver

  • 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.

Outras formas que funcionam

  • =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

Erros comuns

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

Como corrigimos

Qualquer fórmula que produza o resultado certo é aceita, a menos que a tarefa cite uma função: nesse caso, outra função vale metade da pontuação. Comparamos os valores com uma pequena tolerância e ignoramos maiúsculas e espaços no texto. Um número certo digitado à mão em vez de uma fórmula vale metade da pontuação. Tarefas com várias células valem a pontuação integral com 100% das células certas e metade a partir de 50%. Quando faz diferença, também mudamos uma célula de entrada em uma cópia da sua planilha e verificamos se sua fórmula acompanha.

Respostas calculadas com as regras do Excel 365 e verificadas no nosso corretor em 16 de novembro de 2026. Autor: GridBelt team.

Nestes programas

  • Excel test in 7 days, Plano do nível 2Dia 4
  • Excel test in 7 days, Plano do nível 3Dia 3
  • Excel for Data AnalystsDia 5

Exercícios relacionados

  • Full name with CONCAT or &Iniciante, ~4 min
  • Split email into user and domain (FIND/LEFT/RIGHT or TEXTBEFORE/TEXTAFTER)Intermediário, ~7 min
  • Turn text dates into real dates and group by monthAvançado, ~12 min

Referência da função

Documentação oficial

Próximo exercício

Combine tags per product with TEXTJOIN