Camel case converter in an excel

Twisha picture Twisha · Nov 14, 2017 · Viewed 15.4k times · Source

I am trying to convert a field in an excel sheet (e.g. REC_LEN) to camel case. I am using this formula to do that

=LEFT(A1) & RIGHT(SUBSTITUTE(PROPER(A1),"_",""), LEN( SUBSTITUTE(A1,"_",""))-1) 

This is giving me results like RecLen. I want to convert my first letter to lowercase too (The expected output is recLen). Can somebody help me out with this? I am not too familiar with excel formulae. Not sure if this has been already asked before but any help is much appreciated.

Answer

Scott Craner picture Scott Craner · Nov 14, 2017

Try this:

=LOWER(LEFT(A1)) & MID(SUBSTITUTE(PROPER(A1),"_",""),2,LEN(A1))

enter image description here