Ir para o conteúdo principal

Como extrair iniciais de nomes no Excel?

Quando você está processando registros de clientes ou fazendo mala direta, obter as iniciais de um determinado nome pode ser útil para você, por exemplo, HG para Hal Greer. Aqui, apresento alguns truques para você extrair rapidamente as iniciais da lista de nomes no Excel.

Extraia iniciais com fórmula no Excel

Extraia as iniciais usando a função definida no Excel


seta azul bolha direita Extraia iniciais com fórmula no Excel

O primeiro método é usar fórmulas para extrair iniciais de nomes no Microsoft Excel.

Selecione uma célula em branco, por exemplo, Célula C2, digite esta fórmula =LEFT(A2)&IF(ISNUMBER(FIND(" ",A2)),MID(A2,FIND(" ",A2)+1,1),"")&IF(ISNUMBER(FIND(" ",A2,FIND(" ",A2)+1)),MID(A2,FIND(" ",A2,FIND(" ",A2)+1)+1,1),"")(A2 é a primeira célula da sua lista de nomes), pressione Entrar botão e arraste a alça de preenchimento para preencher o intervalo. Agora você verá que todas as iniciais de cada nome foram extraídas da lista de nomes.


seta azul bolha direita Extraia as iniciais usando a função definida no Excel

Além da fórmula, você pode usar a Função Definida para extrair as iniciais de nomes especificados facilmente no Microsoft Excel.

1. Selecione uma célula da coluna que deseja selecionar e pressione Alt + F11 para abrir o Microsoft Visual Basic para Aplicações janela.

2. Na janela pop-up, clique em inserção > Móduloe cole o seguinte código VBA no módulo.

VBA: Extraia as iniciais dos nomes

Function FirstCharacters(pWorkRng As Range) As String
'Updateby20140514
Dim arr As Variant
Dim xValue As String
Dim OutValue As String
xValue = pWorkRng.Value
arr = VBA.Split(Trim(xValue))
For i = 0 To UBound(arr)
    OutValue = OutValue & VBA.Left(arr(i), 1) & "."
Next
FirstCharacters = OutValue
End Function

3. Salve o código e feche a janela, selecione uma célula em branco e digite esta fórmula = Primeiros caracteres (A2), então aperte Entrar botão e arraste a alça de preenchimento para preencher o intervalo desejado. Depois disso, você pode ver as iniciais de cada nome são extraídas.

Dica: Você pode alterar os separadores "." das iniciais conforme necessário no VBA acima.


Artigos relativos:

Melhores ferramentas de produtividade de escritório

🤖 Assistente de IA do Kutools: Revolucionar a análise de dados com base em: Execução Inteligente   |  Gerar Código  |  Crie fórmulas personalizadas  |  Analise dados e gere gráficos  |  Invocar funções do Kutools...
Recursos mais comuns: Encontre, destaque ou identifique duplicatas   |  Excluir linhas em branco   |  Combine colunas ou células sem perder dados   |   Rodada sem Fórmula ...
Super pesquisa: VLookup de múltiplos critérios    VLookup de múltiplos valores  |   VLookup em várias planilhas   |   Pesquisa Difusa ....
Lista suspensa avançada: Crie rapidamente uma lista suspensa   |  Lista suspensa de dependentes   |  Lista suspensa de seleção múltipla ....
Gerenciador de colunas: Adicione um número específico de colunas  |  Mover colunas  |  Alternar status de visibilidade de colunas ocultas  |  Compare intervalos e colunas ...
Recursos em destaque: Foco da Grade   |  Vista de Design   |   Grande Barra de Fórmula    Gerenciador de pastas de trabalho e planilhas   |  Biblioteca (Auto texto)   |  Data Picker   |  Combinar planilhas   |  Criptografar/Descriptografar Células    Enviar e-mails por lista   |  Super Filtro   |   Filtro Especial (filtro negrito/itálico/tachado...) ...
15 principais conjuntos de ferramentas12 Texto Ferramentas (Adicionar texto, Remover Personagens, ...)   |   50+ de cores Tipos (Gráfico de Gantt, ...)   |   Mais de 40 práticos Fórmulas (Calcule a idade com base no aniversário, ...)   |   19 Inclusão Ferramentas (Insira o código QR, Inserir imagem do caminho, ...)   |   12 Conversão Ferramentas (Números para Palavras, Conversão de moedas, ...)   |   7 Unir e dividir Ferramentas (Combinar linhas avançadas, Dividir células, ...)   |   ... e mais

Aprimore suas habilidades de Excel com o Kutools para Excel e experimente uma eficiência como nunca antes. Kutools para Excel oferece mais de 300 recursos avançados para aumentar a produtividade e economizar tempo.  Clique aqui para obter o recurso que você mais precisa...

Descrição


Office Tab traz interface com guias para o Office e torna seu trabalho muito mais fácil

  • Habilite a edição e leitura com guias em Word, Excel, PowerPoint, Publisher, Access, Visio e Project.
  • Abra e crie vários documentos em novas guias da mesma janela, em vez de em novas janelas.
  • Aumenta sua produtividade em 50% e reduz centenas de cliques do mouse para você todos os dias!
Comments (13)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello,
I need to extend this code to 4 initials, but I don’t understand how to extend it.

=LEFT(A2)&IF(ISNUMBER(FIND(" ",A2)),MID(A2,FIND(" ",A2)+1,1),"")&IF(ISNUMBER(FIND(" ",A2,FIND(" ",A2)+1)),MID(A2,FIND(" ",A2,FIND(" ",A2)+1)+1,1),"")

Please can you explain how to add another layer to this formula?
This comment was minimized by the moderator on the site
Hi, use the formula like this:
=LEFT(A2)&IF(ISNUMBER(FIND(" ",A2)),MID(A2,FIND(" ",A2)+1,1),"")&IF(ISNUMBER(FIND(" ",A2,FIND(" ",A2)+1)),MID(A2,FIND(" ",A2,FIND(" ",A2)+1)+1,1),"")&IF(ISNUMBER(FIND(" ",A2,FIND(" ",A2)+1)),MID(A2,FIND(" ",A2,FIND(" ",A2,FIND(" ",A2)+1)+1)+1,1),"")

About the explaination, it not few words can explan. You may know what the functions in the formula is used for what destination. If you want to learn the function, you can visit this site: https://www.extendoffice.com/excel/functions.html
This comment was minimized by the moderator on the site
Thank you so much. This worked perfectly.
This comment was minimized by the moderator on the site
If u need the prefix of Mr., Ms. or Mrs. can add it in the beginning as =LEFT(A2,SEARCH(" ",A2))&
This comment was minimized by the moderator on the site
Very good formula to get the initials from a name. But if the name contains with Mr., Ms. or Mrs. then this does not work. We have to separate put this prefix first. For that you can replace the A2 with TRIM(MID(A2,SEARCH(" ",A2)+1,100)) . So the formula will be as under
=LEFT(TRIM(MID(A2,SEARCH(" ",A2)+1,100)) )&IF(ISNUMBER(FIND(" ",TRIM(MID(A2,SEARCH(" ",A2)+1,100)) )),MID(TRIM(MID(A2,SEARCH(" ",A2)+1,100)),FIND(" ",TRIM(MID(A2,SEARCH(" ",A2)+1,100)) )+1,1),"")&IF(ISNUMBER(FIND(" ",TRIM(MID(A2,SEARCH(" ",A2)+1,100)),FIND(" ",TRIM(MID(A2,SEARCH(" ",A2)+1,100)) )+1)),MID(TRIM(MID(A2,SEARCH(" ",A2)+1,100)),FIND(" ",TRIM(MID(A2,SEARCH(" ",A2)+1,100)),FIND(" ",TRIM(MID(A2,SEARCH(" ",A2)+1,100)) )+1)+1,1),"")
This comment was minimized by the moderator on the site
Thank you for this!! I had been struggling with getting initials from a last name with a space or hyphen and was able to use this formula as-is, with the addition of another IF that searched for a hyphen. A huge relief!!
This comment was minimized by the moderator on the site
I used the formula above, but if the person does not put a space between their first / last name, how do you keep that from error out?
This comment was minimized by the moderator on the site
Amazing Thank you!
This comment was minimized by the moderator on the site
hi there
I Want to sort full name in to a new format if excel cell has text character more than 25 how to show it in initials and last name
Ex 01:- name has more than 25 characters
Full Name : Mildred Dresselhaus Lene Vestergaard Hau
Show as : M.D.L Vestergaard Hau
(it may add if more initials are ther for a long name)
Ex 02:-
Full Name : Enrico Fermi
Show as : Enrico Fermi
This comment was minimized by the moderator on the site
If the text contains more than 03 words
This comment was minimized by the moderator on the site
This works!!! Thank you!
This comment was minimized by the moderator on the site
Thank you! :lol: quite useful!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations