nnsea 发表于 2023-10-26 13:36:32

拆分英语单词vba

Sub test()
With CreateObject("vbscript.regexp")
    .Global = True
    .Pattern = "(?!^)(?=)"
    For Each Rng In
      Cells(Rng.Row, 2) = .Replace(Rng, "-")
    Next
End With
End Sub
页: [1]
查看完整版本: 拆分英语单词vba