Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Turn one_two to getOneTwo

I have a bunch of variables in the form of one, two, three, four_five and I’d like to turn them to getOne, getTwo, getThree, getFourFive

I wrote a formula that achieves what I want for the first three ones, but I can’t achieve the CamelCase to variables with two words (or more) separated by an underscore.

So the formula I wrote is this:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

=CONCAT("get";UPPER(LEFT(A1;1));RIGHT(A1;LEN(A1)-1))

How can this be expanded to achieve what I need? TIA

>Solution :

Using SUBSTITUTE and PROPER:

="get"&SUBSTITUTE(PROPER(A1),"_","")

enter image description here

Since your version of Excel uses ; as the list separator:

="get"&SUBSTITUTE(PROPER(A1);"_";"")
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading