Capitalize the first letters of first and last name (Title Case / Camel Case / Capital Case / Proper Case)

I received an export of user data and the names were all over the place; some all lower case, some all upper, some a mixed bag. I needed a way to take the names and standardize them all to be Proper Case so messaging looks good.

While Excel has the proper() function, Coda has upper() and lower() but nothing similar. I created the tool below to help you solve this problem!

3 Likes

I’ve made a more generalized version

5 Likes

Wow! Really cool way to manipulate text values!

Thank you for posting!

1 Like

Consolidating my shared docs into one - here you can find the First Last Parser amongst others:

2 Likes

@BenLee In my above post :point_up: I linked directly to the First Last Name section but it is rendering for me in the ‘Side by Side’ section?

When you click on the Share button in the doc, can you use the “Embed” option and paste that code in? That might force that one section. You can also hide the sections menu on the left if you want.

OK I edited the above post and that worked @BenLee. :pray:

1 Like

This is amazing! Thank you for sharing! However I have a little issue - lots of the names in my list have a middle name - is there any chance you could help in adapting this so that it can accomodate for middle names!?

Thanks if so!!

1 Like

Hi @Ben_Swanson
In the doc in the second comment in this post there is a column called [Name Split Proper Case] that might be what you want. I’ve also added three separate columns: [First Name], [Middle (Second) Name] and [Last Name].

Thank you!! I’ve just requested access to your doc, really appreciate you sharing it!

You should be able to copy it now

2 Likes

this. is. AMAZING! Thank you!! Saved me so much time figuring out this myself, I really appreciate you sharing it!!

I find this formula a little more readable:

Firstname.Lower().Replace(1,1 ,Firstname.Left(1).Upper())

For clarity Firstname is the column. The formula converts the string to lowercase, then replaces the first character, with an uppercase version is the first character!

Dear @David_Clegg,

Thanks for your input, you are right when the first name is just a single name, but did you test this with my Firstname: Jean Pierre?

One of the things to concern when writing a formula is to catch all optional cases!

It was simply an example to capitalise the first letter, but a more complete solution would be:

FullName.Lower().Split(' ').FormulaMap(
   CurrentValue.Replace(1,1 ,CurrentValue.Left(1).Upper())
)
.Join(' ')

Where FullName is the column

Here we take the FullName and convert it to lowercase. Then we split each name (based on space) into multiple names. Then, for each of those names, we replace the first character with an uppercase version of the same character.
Finally, we join all the names back together with a space between each name.

5 Likes

@Johg_Ananda, @David_Clegg’s answer should be marked as the solution so that people can more easily find it.

1 Like