nnsea 发表于 2023-10-26 13:57:42

提取联系方式VBA



Sub 提取联系方式()
Set regx = CreateObject("vbscript.regexp")
With regx
    .Global = True
    .Pattern = "\d+-?\d+"
    For Each Rng In
      Set mat = .Execute(Rng)
      For Each m In mat
      n = n + 1
            Cells(Rng.Row, n + 1) = m
      Next m
      n = 0
    Next Rng
End With
End Sub
页: [1]
查看完整版本: 提取联系方式VBA