Sub paixu(ByRef xian_arr as Collection)
maxnban = 0
maxban = 0
Dim lindi_arr As New Collection
For i= 1 To xian_arr.Count Step 1
If xian_arr(i) < 8000 Then
lindi_arr.Add Cells(i, 1).Value
End If
If maxnban < xian_arr(i) Then
maxnban = xian_arr(i)
End If
i = i + 1
Next
For i = 1 To lindi_arr.Count Step 1
If maxban < lindi_arr(i) Then
maxban = lindi_arr(i)
End If
Next
End Sub
i = 1
Dim xian_arr As New Collection
only_one_xiaoban = true
cun_xiaoban_end = false
Do While Cells(i, 1).Value <> ""
If Cells(i,1).Value = Cells(i+1,1) Then
xian_arr.Add Cells(i,1).Value
only_one_xiaoban = false
End If
If only_one_xiaoban = true Then
Cells.(i,3).Value = Cells.(i,1).Value
End If
If Cells(i,1).Value <> Cells(i+1,1) and only_one_xiaoban = false Then
xian_arr.Add Cells(i+1,1)
only_one_xiaoban = true
cun_xiaoban_end = true
End If
If cun_xiaoban_end = true Then
Next
End If
Loop