|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
入职的帮你写好了 离职的自己改改
- Sub rz()
- k = 3
- For i = 2 To Sheets("list").Cells(Rows.Count, 1).End(xlUp).Row
- yy = Split(Sheets("list").Cells(i, "e"), "/")(0)
- mm = Split(Sheets("list").Cells(i, "e"), "/")(1)
- If yy = Sheets("total").Cells(2, "g").Text And mm = Sheets("total").Cells(2, "h").Text Then
- arr = Sheets("list").Range("b" & i & ":e" & i)
- Sheets("total").Range("C" & k).Resize(UBound(arr), 4) = arr
- Sheets("total").Cells(k, 1) = k - 2
- k = k + 1
- End If
- Next
- Sheets("total").Cells(2, "i") = k - 3
- End Sub
复制代码 |
|