首页 > 其他 > 详细

全部自动编号小班

时间:2018-02-04 23:56:24      阅读:319      评论:0      收藏:0      [点我收藏+]


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

全部自动编号小班

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!