how do I display the first letter of each word in let's say cell A1:
Example:
A1= Foo bar
A1= Foo
in the first example, I want to display "Fb"
in the second example, I want to see "F"
If A1 = empty I don't want to show anything
I tried this:
=REGEXEXTRACT(A1;"^.")
that shows only the first letter
How about this? Please think of this as just one of several answers.
=IF(A1="","",JOIN("",ARRAYFORMULA(REGEXEXTRACT(SPLIT(A1," "),"\b[\w]"))))
"" and the first letters of each word are put, respectively. SPLIT.REGEXEXTRACT and ARRAYFORMULA.
\b[\w] was used.JOIN.
If this was not the result you want, I apologize.
As an other, it uses LEFT instead of REGEXEXTRACT.
=IF(A1="","",JOIN("",ARRAYFORMULA(LEFT(SPLIT(A1," ")))))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With