excel vba 进度表
1、打开EXCEL,把你计划的每一项、每一项中的每件工作按序号分开,例如,我做的工作有38个项目,每个项目有56个小项,因为工作是同时进行的,所以每完成一项,我就摸黑一项。(下面的图,是我工作进展中的情况。)

2、打开VBA,输入下面的内容:
Private Sub CommandButton1_Click()
Dim hang As Integer
Dim lie As Integer
Dim Bcol As Integer
Dim i, i1, n As Integer
n = 0
hang = Range("ak1").Value
lie = Range("al1").Value
For i = 2 To hang
For i1 = 2 To lie
Bcol = Cells(i, i1).Interior.ColorIndex
If Bcol = 1 Or Bcol = 16 Then
n = n + 1
End If
Next i1
Cells(i, lie + 1).Value = lie - n - 1
n = 0
Next i
End Sub
3、之后回到excel界面,按一下“剩余(统计)”按钮,项目未完成多少会出现在单元AJ列。
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:123
阅读量:104
阅读量:70
阅读量:91
阅读量:118