Neill
Neill

Reputation: 452

In an array, return all values except one

I would like to use a formula to capitalize just the first letter of an array of words. Sometimes the array might have just 1 word, and sometimes 2, 3, 4 or more words. The source is dynamic, so I need my formula to be flexible. I know about Proper(text), but that capitalizes every word.

For example, in cell A1 I might have the text "aidan is a good boy,"
or I might just have "hi,"
or maybe it will say, "drive in your own lane please!"

My formula over in B1 needs a result of "Aidan is a good boy,"; "Hi,"; or "Drive in your own lane please!"

I wish I could say, B1: =Proper(index(split(M1, " "), 1)) & " " & lower(index(split(M1, " "), *everything except 1*)), but I don't know how to fill in the *everything except 1* part of the formula.

Upvotes: 1

Views: 369

Answers (1)

pnuts
pnuts

Reputation: 59475

Please try:

=REPLACE(A1,1,1,UPPER(left(A1)))

Upvotes: 1

Related Questions