|
Sub 按钮4_Click()
Application.ScreenUpdating = False
crr = Array("pRRU", "RRU", "pRU")
[h1] = "结果"
arr = ActiveSheet.UsedRange
For j = 2 To UBound(arr)
If Len(arr(j, 4)) > 0 Then
brr = Split(arr(j, 4), ",")
For i = 0 To UBound(brr)
For k = 0 To UBound(crr)
If InStr(brr(i), crr(k)) > 0 Then
If Split(brr(i), crr(k))(1) Like "*[1-9]*" Then
arr(j, 8) = Mid(brr(i), InStr(brr(i), crr(k)))
GoTo l1
End If
End If
Next k
Next i
l1:
End If
Next j
ActiveSheet.UsedRange = arr
Application.ScreenUpdating = True
End Sub
|
|