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
|