|
Sub test0()
Dim ar, i As Long, n As Double, s As String
ar = Range("N4", Range("D4").End(xlDown))
For i = 1 To UBound(ar)
n = Val(ar(i, 2))
s = ar(i, 5) & "-" & ar(i, 7) & "-" & ar(i, 11)
If ar(i, 1) Like "[AC]-*" Then
Select Case n
Case Is <= 3500
If s = "1-4-1" Then
'判断 1
End If
Case Is >= 10000
If s = "1-5-2" Then
'判断 3
End If
Case Else '(35000, 10000)
If s = "2-4-2" Then
'判断 2
End If
End Select
ElseIf ar(i, 1) Like "G-*" Or ar(i, 1) Like "SG-*" Then
Select Case n
Case Is <= 750
If s = "1-4-1" Then
'判断 4
End If
Case Is >= 2100
'空 未说明,不执行操作
Case Else '(751, 2100)
If s = "1-8-2" Then
'判断 5
End If
End Select
ElseIf ar(i, 1) Like "L-*" Or ar(i, 1) Like "SL-*" Then
If ar(i, 2) <= 250 Then
If s = "1-3-1" Then
'判断 6
End If
End If
Else
'6种 以外情况
End If
Next
End Sub
|
评分
-
1
查看全部评分
-
|