nnsea 发表于 2023-10-26 13:40:56

汇总凌乱的开销记录带元计算VBA

Sub 带元计算()
With CreateObject("vbscript.regexp")
    .Global = True
    .Pattern = "\d+\.?\d?(?=[元块])"
    For Each Rng In
      For Each m In .Execute(Rng)
            n = n + m * 1
      Next
      Cells(Rng.Row, "c") = n
      n = 0
    Next
End With
End Sub
页: [1]
查看完整版本: 汇总凌乱的开销记录带元计算VBA