nnsea 发表于 2023-10-25 23:55:56

规范格式VBA


Sub 规范格式()

Dim regx As Object, rng As Range

Set regx = CreateObject("vbscript.regexp")

With regx

.Global = True

.ignorecase = True

.Pattern = "\s"

For Each rng In

Cells(rng.Row, 2) = .Replace(rng.Value, "--")

Next

End With

End Sub

页: [1]
查看完整版本: 规范格式VBA