Capitalize only the first letter with LAMBDA in Excel

Viewed 139

In order to capitalize only the first letter of a text I used
=UPPER(LEFT(A1,1)) & LOWER(RIGHT(A1,LEN(A1)-1))

With the introduction of LAMBDA function in Excel, how can I create a custom lambda function out of it?

3 Answers

Formulas -> Name Manager -> New...

Name: fill in the name which will be used to call the function, e.g. UPFIRST
Refers To: =LAMBDA(x, UPPER(LEFT(x,1)) & LOWER(RIGHT(x,LEN(x)-1)))
lambda function in excel's name manager to capitalize only the first letter in a string

OK to save the custom lambda function.
Close to exit the Name Manager.

In the sheet it's called like this:
calling UPFIRST lambda function in excel's sheet

Nice a first question about LAMBDA() =).

Maybe just:

=LAMBDA(X,REPLACE(LOWER(X),1,1,UPPER(LEFT(X))))(A1)

If you want the "machine" then use =LAMBDA(X,REPLACE(LOWER(X),1,1,UPPER(LEFT(X)))) in your name manager.

I suppose there's always the PROPER function....

Related