|
- Sub a()
- Sheet8.Range("h4:ae10").ClearContents
- Dim i As Integer, j As Byte, k As Byte, m As Byte
- For j = 1 To 7
- With Sheets(j)
- For i = 5 To .[a65536].End(3).Row
- k = Sheet8.Cells(3 + j, Month(.Cells(i, 5)) * 2 + 6)
- m = Sheet8.Cells(3 + j, Month(.Cells(i, 5)) * 2 + 7)
- If .Cells(i, "o") <> "" Or .Cells(i, "p") <> "" Then
- m = m + 1
- End If
- k = k + 1
- Sheet8.Cells(3 + j, Month(.Cells(i, 5)) * 2 + 6) = k
- Sheet8.Cells(3 + j, Month(.Cells(i, 5)) * 2 + 7) = m
- Next i
- End With
- Next j
- End Sub
复制代码 你试试这代码 |
|