|
发表于 2016-11-4 11:29
|
显示全部楼层
本楼为最佳答案
Sub test()
Dim i, x
For i = 2 To 4
x = Cells(i, "i")
x = VBA.Replace(x, "〉", ">")
Cells(i, "g") = tq(x)
Next i
End Sub
Function tq(str)
Dim matchs As Object, match As Object, d
Set d = CreateObject("scripting.dictionary")
d.RemoveAll
With CreateObject("VBScript.RegExp")
.Global = True
.Pattern = ".(?=>)"
Set matchs = .Execute(str)
For Each match In matchs
d(match.Value) = ""
Next
End With
tq = Join(d.keys, ",")
End Function |
评分
-
查看全部评分
|