|
参与一下。。。
- Sub ykcbf() '//2024.4.30
- Dim arr, brr
- Application.ScreenUpdating = False
- arr = Sheet3.Range("a1").CurrentRegion
- ReDim brr(1 To UBound(arr), 1 To UBound(arr, 2) - 1)
- b = [{1,2,3,5,6,7,8,9,10}]
- With Sheets("产能查询")
- .[a4:i10000] = ""
- rq1 = DateValue(.[g2])
- rq2 = DateValue(.[i2])
- xm = .[b2]
- For i = 2 To UBound(arr)
- rq = DateValue(arr(i, 5))
- If rq >= rq1 And rq <= rq2 Then
- If arr(i, 4) = xm Then
- m = m + 1
- brr(m, 1) = m
- For j = 2 To UBound(b)
- brr(m, j) = arr(i, b(j))
- Next
- End If
- End If
- Next
- .Columns(5).NumberFormatLocal = "0"
- .[a4].Resize(m, UBound(arr, 2) - 1) = brr
- End With
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
2
查看全部评分
-
|