nnsea 发表于 2023-10-25 13:11:14

一列经理总裁董长替换成高管VBA

Sub test2()
Set regx = CreateObject("vbscript.regexp")
With regx
    .Global = True
    .ignorecase = True
    .Pattern = "经理|总裁|董事长"
    For Each Rng In
      n = n + 1
      Cells(n + 1, "b") = .Replace(Rng, "高管")
    Next
End With
End Sub

页: [1]
查看完整版本: 一列经理总裁董长替换成高管VBA