=SUBSTITUTE(PROPER(SUBSTITUTE(A20,"_"," "))," ","")
It first replaces _ for a space character. Then creates Caps for the first character after the space and finally removes the spaces.
If you truly only need the character after _ to be in caps, then use this Office 365 solution:
=LET(cell, A2,
a, SEQUENCE(LEN(cell)),
SUBSTITUTE(
REDUCE( A20, a,
LAMBDA( b, c,
IF(MID(b,c,1)="_",
LEFT(b,c-1)&UPPER(MID(b,c,2))&RIGHT(b,MAX(a)-c-1),
b))),"_",""))
Answer from P.b on Stack OverflowExcel replace underscore with next character in uppercase and remove underscore - Stack Overflow
remove a "_" from a field
Macro find and replace underscore but do not remove ...
Remove underscore and pick first value seperately and next two values in another cell in excel - Stack Overflow
I have TONS of headers that look like the following
owner2_address_1_city
There underscores instead of spaces make it hard to read quickly and make wrapping text useless. is there an easy way to change it to normal text i.e. below:
"owner 2 address 1 city"
Thanks in advance!
i have a shared excel sheet that has a column where numbers in this format (####-######-#######-#) are entered. We have it flagged to highlight when duplicates are entered but often some users are typing underscores between the numbers instead of dashes. I need to either make excel automatically replace the underscores typed in the cell with dashes so that the highlighting rule still work, or i need the rule to work regardless of what special characters are in the numbers.
