|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub aa()
Set reg = CreateObject("Vbscript.Regexp")
With reg
.Global = True
.IgnoreCase = True
.Pattern = "[^\n]+"
End With
For i = 3 To 4
Set mc = reg.Execute(Cells(i, 2))
For Each x In mc
Select Case Left(x, 3)
Case "?????"
Cells(i, 4) = Replace(x, "?????", "", , , vbBinaryCompare)
Case "????"
Cells(i, 5) = Replace(x, "????", "", , , vbBinaryCompare)
Case "????"
Cells(i, 6) = Replace(x, "????", "", , , vbBinaryCompare)
Case "????"
Cells(i, 7) = Replace(x, "????", "", , , vbBinaryCompare)
End Select
Next
Next
End Sub
|
评分
-
1
查看全部评分
-
|