web123456

Hump ​​turns underlined in various ways, there is always one you need at work

ideahumd underscore conversion

Mode string

(\w*)_(\w*)
  • 1

Capture group plus capitalization conversion

\$1\u$2
  • 1

illustrate:$1 means the first capture group, $0 means thisString, \u is the next character converted to uppercase, and the corresponding \l is lowercase

Excel Camel to Underscore [Macro command]

Sub CamelToUnderline()
Dim c As Range
For Each c In Selection
Dim result As String
result = “”
Dim str As String
str =
For i = 1 To Len(str)
Dim currentLetter As String
currentLetter = Mid(str, i, 1)
If i = 1 Then
result = result & LCase(currentLetter)
ElseIf currentLetter = UCase(currentLetter) Then
result = result & “_” & LCase(currentLetter)
Else
result = result & currentLetter
End If
Next i
= result
Next c
End Sub

Note: xVAT will be converted to x_v_a_t. If you use it, you can pay attention to it. You can also modify it yourself.algorithmTargeted compatible, but it doesn't feel necessary. There shouldn't be many such data scenarios

Excel underscore to camel[function]

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

 Or so
 =LEFT(A1,1)&MID(SUBSTITUTE(PROPER(A1),"_",""),2,100)
  • 1
  • 2
  • 3
  • 4

Excel underscore to camel [macro]

Sub UnderlineToCamel()
    Dim cell As Range
    For Each cell In Selection
         = (Replace(, "_", " "))
         = Replace(, " ", "")
    Next cell
End Sub
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7