我似乎遇到了一个我无法看到的奇怪问题,想弄清楚。一切正常,直到它试图向前看三步。这很奇怪,因为在其他设置中这很好用吗? (嵌套的IF)。
任何人都有一些见解?
Dim CFArray (37,1) As Date
Select Case Stuff
Case Is <> CFArray(l, 0)
If Stuff > CFArray(l, 0) Then
For m = LBound(CFArray, 2) To UBound(CFArray, 2)
If Stuff < CFArray(l, m) Then
Stuff = CFArray(l + 1, 0)
Stuff2 = CFArray(l + 1, m)
End If
Next m
End If
If Stuff > CFArray(l + 1, 0) Then
For m = LBound(CFArray, 2) To UBound(CFArray, 2)
If Stuff < CFArray(l + 1, m) Then
Stuff = CFArray(l + 2, 0)
Stuff2 = CFArray(l + 2, m)
End If
Next m
End If
If Stuff > CFArray(l + 2, 0) Then *this is where it trips up, the value is the third step in the array?
For m = LBound(CFArray, 2) To UBound(CFArray, 2)
If Stuff < CFArray(l + 2, m) Then
Stuff = CFArray(l + 3, 0)
Stuff2 = CFArray(l + 3, m)
End If
Next m
End If
End Select