Sub TEST_a1()
Dim Arr, i&, j%, TR, V1, V2
Arr = Range([b1], [b65536].End(xlUp))
For i = 2 To UBound(Arr)
TR = Split(Arr(i, 1), "-"): Arr(i - 1, 1) = "": V = ""
If UBound(TR) < 1 Then GoTo i01
For j = 1 To Len(TR(0))
If Mid(TR(0), j, 1) Like "#" Then V1 = Val(Mid(TR(0), j)): Exit For
Next j
If V1 = "" Or V1 > 390 Then GoTo i01
V2 = Val(TR(UBound(TR)))
Arr(i - 1, 1) = IIf(V2 > 180, "", IIf(V2 > 90, 2, 1))
i01: Next i
[c2].Resize(UBound(Arr) - 1) = Arr
End Sub作者: samwang 時間: 2021-6-21 14:26