windowns下excel2013快速生成月报表

  作者:邓聪聪

  windowns下excel快速生成月报表,省去了手工复制繁琐的过程

Sub AutoCopySheets()
Dim i, j As Integer
i = 1
j = 11
For i = 1 To 1
j = j + 1
    Sheets("2016.11").Copy After:=Sheets(Sheets.Count)
    Sheets(Sheets.Count).Name = "2016" & "." & j
    Sheets(Sheets.Count).Range("A2") = "2016年" & j & "月 第一周"
    Sheets(Sheets.Count).Range("A27") = "2016年" & j & "月 第二周"
    Sheets(Sheets.Count).Range("A55") = "2016年" & j & "月 第三周"
    Sheets(Sheets.Count).Range("A81") = "2016年" & j & "月 第四周"
	
	
Next


Dim a, b As Integer
a = 1
b = 0
For a = 1 To 10
b = b + 1
    Sheets("2016.11").Copy After:=Sheets(Sheets.Count)
    Sheets(Sheets.Count).Name = "2017" & "." & b
    Sheets(Sheets.Count).Range("A2") = "2017年" & b & "月 第一周"
    Sheets(Sheets.Count).Range("A27") = "2017年" & b & "月 第二周"
    Sheets(Sheets.Count).Range("A55") = "2017年" & b & "月 第三周"
    Sheets(Sheets.Count).Range("A81") = "2017年" & b & "月 第四周"
Next

End Sub
原文地址:https://www.cnblogs.com/dengcongcong/p/8657051.html