|
参与一下。。。
- Sub ykcbf() '//2024.11.14
- Application.ScreenUpdating = False
- r = Cells(Rows.Count, 2).End(3).Row
- arr = [b1].Resize(r, 2)
- ReDim zrr(1 To r, 1 To 2)
- For i = 2 To UBound(arr)
- If arr(i, 2) = "合格" Then
- m = m + 1
- zrr(m, 1) = DateValue(CDate(arr(i, 1)))
- zrr(m, 2) = arr(i, 2)
- End If
- Next
- ReDim brr(1 To 2, 1 To 100)
- k = 100
- For i = 1 To UBound(zrr) Step k
- n = n + 1
- brr(1, n) = n
- If i + k - 1 < m Then
- rq1 = zrr(i, 1)
- rq2 = zrr(i + k - 1, 1)
- brr(2, n) = DateDiff("d", rq2, rq1)
- Else
- brr(2, n) = Format((m - i + 1) / 100, "0.00%")
- End If
- Next
- [l6].Resize(2, n) = brr
- [l6].Resize(2, n).Borders.LineStyle = 1
- Application.DisplayAlerts = True
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|