手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

excel vba 进度表

时间:2024-10-14 04:15:16

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

excel vba 进度表

2、打开VBA,输入下面的内容:Private Sub CommandButton1_Click()Dim ha荏鱿胫协ng As IntegerDim lie As IntegerDim Bcol As IntegerDim i, i1, n As Integern = 0hang = Range("ak1").Valuelie = Range("al1").ValueFor i = 2 To hangFor i1 = 2 To lieBcol = Cells(i, i1).Interior.ColorIndexIf Bcol = 1 Or Bcol = 16 Thenn = n + 1End IfNext i1Cells(i, lie + 1).Value = lie - n - 1n = 0Next iEnd Sub

3、之后回到excel界面,按一下“剩余(统计)”按钮,项目未完成多少会出现在单元AJ列。

© 手抄报圈