nnsea 发表于 2023-10-26 14:04:41

英文和汉字一个单元格拆分成两列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