Home > Software design >  How can I transform the string in excel
How can I transform the string in excel

Time:10-06

I'm looking for a way to transform a string like 'TRSP_INV_CD' to 'TrspInvCd' in excel. I will be very grateful if anyone can give me a solution to this issue. Thanks very much.

CodePudding user response:

Try below formula

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

enter image description here

CodePudding user response:

Use PROPER to capitalise, and SUBSTITUTE to remove the _'s

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

CodePudding user response:

There are 2 ways towards the solution of this problem :

  1. Using the replace function (built-in)
  2. Using substitute formula Example: =SUBSTITUTE(ORIGINAL_STRING,"OLD_CHARACTER","NEW_CHARACTER") In this case =SUBSTITUTE(TRSP_INV_CD,"_","")

For more information on this consider visiting this here

  • Related