码迷,mamicode.com
首页 > 其他好文 > 详细

全部自动编号小班

时间:2018-02-05 00:36:51      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:do while   and   cti   自动编号   i+1   only   ext   loop   end   


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

全部自动编号小班

标签:do while   and   cti   自动编号   i+1   only   ext   loop   end   

原文地址:https://www.cnblogs.com/lbsjs/p/8414680.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!