|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub dddd()
- r = Sheets("01月工资表").Cells(Sheets("01月工资表").Rows.Count, 1).End(xlUp).Row
- Set tou = Sheets("01月工资表").Range("b2:q2")
- For i = 3 To r - 3
- r1 = Sheets("工资条").Cells(Sheets("工资条").Rows.Count, 1).End(xlUp).Row
- tou.Copy Sheets("工资条").Cells(r1 + 3, 1)
- Sheets("工资条").Cells(r1 + 3, 17) = "所属月份"
- Sheets("01月工资表").Cells(i, 2).Resize(1, 16).Copy Sheets("工资条").Cells(r1 + 4, 1)
- Sheets("工资条").Cells(r1 + 4, 17) = Left(Sheets("01月工资表").Cells(1, 1).Value, 8)
- Next
- End Sub
复制代码 |
|