nnsea 发表于 2023-10-25 23:52:29

提取数字vba


Sub 提取数字()

Dim regx As Object, rng As Range

Set regx = CreateObject("vbscript.regexp")

With regx

.Global = True

.ignorecase = True

.Pattern = "\D"

For Each rng In

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

Next

End With

End Sub

页: [1]
查看完整版本: 提取数字vba