Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Camel case converter in an excel

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.

like image 939
Twisha Avatar asked Nov 14 '17 13:11

Twisha


People also ask

How do I change from lowercase to CamelCAse in Excel?

Type =PROPER(A2), and press Enter. Tip: Use the formula =UPPER(A1) for all UPPERCASE; =LOWER(A1) for all lowercase.

Can you change case in Excel?

Microsoft Excel has three special functions that you can use to change the case of text. They are UPPER, LOWER and PROPER. The upper() function allows you to convert all lowercase letters in a text string to uppercase. The lower() function helps to exclude capital letters from text.

How do you auto capitalize in Excel?

Select the "Formulas" tab > Select the "Text" drop-down list in the "Function Library" group. Select "LOWER" for lowercase and "UPPER" for uppercase. Next to the "Text" field, click the spreadsheet icon. Click the first cell in the row or column that you would like to change the text case.


2 Answers

Just use =PROPER(A1) on the another cell and you have it done.

like image 104
Baraka Mbega Avatar answered Oct 10 '22 21:10

Baraka Mbega


Try this:

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

enter image description here

like image 22
Scott Craner Avatar answered Oct 10 '22 21:10

Scott Craner