- ©«¤l
- 913
- ¥DÃD
- 150
- ºëµØ
- 0
- ¿n¤À
- 1089
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- office 2019
- ¾\ŪÅv
- 50
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2011-8-28
- ³Ì«áµn¿ý
- 2023-7-19
|
¥»©«³Ì«á¥Ñ PJChen ©ó 2020-1-26 22:00 ½s¿è
¦^´_ 9# ã´£³¡ªL
½Ð°Ýã¤j,
¦PÓÀÉ®×,Sheet¥H1~31©R¦W,¨ä¤¤¤]¦³«D¼Æ¦rªº¤u§@ªí,§Ú»Ýn¤@Ó¥i¥H§R°£¤j©ó¤ë©³¤é¤u§@ªíªº¥\¯à(«D¼Æ¦rªº¤u§@ªí¤£§R,¥Ø«e±Æ§Ç,²Ä¤@Ó¤u§@ªí¬°¤å¦r¤u§@ªí),¦pªG·í¤ë¥¿¦n¬O31¤Ñ,¤]³£¤£¥Î§R°£¤u§@ªí,
µ{¦¡½X«Üªø,§Ú¥uºI¨ú¤@³¡¥÷,¥H¤U³o¥y, ¤@ª½°õ¦æ±o«Ü©Ç,¦sÀɮɬ°2¤ë¥÷¤é´Á,2¤ë¥÷¦³29¤é,¥¦«o¥u§R°£29¡B31ªº¤u§@ªí,§Ú»Ýn§R°£ªº¬O30¡B31ªº¤u§@ªí,½Ð°Ý¥i¥H«ç»ò×¥¿µ{¦¡?
Sheets(j).Delete '§R°£¤j©ó¤ë©³¤éªº¤u§@ªí- Dim Path As String, myPath As String, File As String, xFile As String, i As String, m As String, xd As Long, j As Long, xJ As Long, k As Long
- i = DateSerial(Year(Date), Month(Date) + 1, 1) '³]©w¤UÓ¤ë1¤é
- m = Format(i, "M¤ë") '³]©w¤UÓ¤ë¥÷
- xd = Format(DateSerial(Year(Date), Month(Date) + 2, 1) - 1, "D") '¤UӤ멳¤éÅܼÆ
- With Workbooks.Open(Path & File)
- For j = 2 To ActiveWorkbook.Sheets.Count '±q#2¶}©lªº¤u§@ªí¤¤´`Àô
- ActiveWorkbook.Sheets(j).Activate
- [A2] = [A2].Value 'ȤÆ
- [B1] = [B1].Value 'ȤÆ
-
- If j > xd Then
- Sheets(j).Delete '§R°£¤j©ó¤ë©³¤éªº¤u§@ªí
- End If
- Next
- Sheets("1").Activate
- For k = 1 To [U1] '±NU1Àx¦s®æªºÈ,§@¬°ÅܼƦs¨ú¦¸¼Æ,¨Ì§Ç©R¦WÀɮצW¨Ã¦sÀÉ
- [P1] = k '«ü©wÀx¦s®æªºÈ
- ActiveWorkbook.SaveAs filename:=myPath & [G1] & " _" & m & ".xlsx" 'one by one ¦sÀÉk¦¸
- Next
- ActiveWorkbook.Close True '¦sÀÉ«áÃö³¬ÀÉ®×
- End With
½Æ»s¥N½X |
|