|
Sub lll()
Dim rex As Object
Dim i As Integer
Dim rng As Range
Set rex = CreateObject("vbscript.regexp")
i = Cells(Rows.Count, 6).End(xlUp).Row
For Each rng In Range("f2:f" & i)
If InStr(1, rng, "*") <> 0 Then
With rex
.Global = True
.IgnoreCase = True
.Pattern = "[0-9.]+"
If .Execute(rng)(0) > .Execute(rng)(1) Then
rng.Interior.ColorIndex = 3
End If
End With
End If
If InStr(1, rng, "*") <> 0 And InStr(1, rng, "SQ") <> 0 Then
With rex
.Global = True
.IgnoreCase = True
.Pattern = "[0-9.]+"
If .Execute(rng)(0) = .Execute(rng)(1) Then
rng.Interior.ColorIndex = 6
End If
End With
End If
Next
End Sub
|
评分
-
1
查看全部评分
-
|