Extrair primeira letra de seis palavras

anvs

New Member
Joined
Apr 18, 2023
Messages
31
Office Version
  1. 365
Platform
  1. Windows
Olá!
Para extrair a primeira letra de quatro palavras, tenho a fórmula:

=IF(ISERR(LEFT(A1;1)&MID(A1;SEARCH(" ";A1)+1;1)&MID(A1;SEARCH(" ";A1;SEARCH(" ";A1)+1)+1;1)&MID(A1;SEARCH(" ";A1;SEARCH(" ";A1;SEARCH(" ";A1)+1)+1)+1;1));IF(ISERR(LEFT(A1;1)&MID(A1;SEARCH(" ";A1)+1;1)&MID(A1;SEARCH(" ";A1;SEARCH(" ";A1)+1)+1;1));IF(ISERR(LEFT(A1;1)&MID(A1;SEARCH(" ";A1)+1;1));IF(ISERR(LEFT(A1;1));"";LEFT(A1;1));LEFT(A1;1)&MID(A1;SEARCH(" ";A1)+1;1));LEFT(A1;1)&MID(A1;SEARCH(" ";A1)+1;1)&MID(A1;SEARCH(" ";A1;SEARCH(" ";A1)+1)+1;1));LEFT(A1;1)&MID(A1;SEARCH(" ";A1)+1;1)&MID(A1;SEARCH(" ";A1;SEARCH(" ";A1)+1)+1;1)&MID(A1;SEARCH(" ";A1;SEARCH(" ";A1;SEARCH(" ";A1)+1)+1)+1;1))

Necessitava de extrair a primeira letra de seis palavras. Tenho tentado mas sem sucesso.
Peço a vossa ajuda.
Antecipadamente grato.
anvs
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Tente isso. Isso seria mais fácil com a função TEXTSPLIT, mas ainda não a tenho.

(Traduzido pelo Google.)

Excel Formula:
=CONCAT(IFERROR(MID(A1;FIND("|";SUBSTITUTE(" "&A1;" ";"|";SEQUENCE(6)));1);""))
 
Last edited:
Upvote 0
Solution
Muito bem, Eric!

Já que eu tenho TEXTSPLIT, se você também tiver, esta seria uma versão usando TEXTSPLIT.

Excel Formula:
=LEFT(CONCAT(LEFT(TEXTSPLIT(A1," "),1)),6)

(Observação: minha fórmula está usando vírgulas em vez de ponto e vírgula como delimitadores nas chamadas para as funções do Excel.)
 
Upvote 0

Forum statistics

Threads
1,223,926
Messages
6,175,429
Members
452,641
Latest member
Arcaila

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top