¦U¦ì, ¥»¤H¦³¤@WORKBOOK¤º¦³¸ê®Æ, »Ýn¦bSORTING "¦a°Ï" ©M"²Õ§O" «á. «ö"¦a°Ï"¥t¦s·sWORKSHEET, ¨Ã¥H"¦a°Ï" §@¬°WORKSHEET¦WºÙ, ¦ý¤U¦CCODE¦³°ÝÃD, ¨D±Ð°ÝÃD©Ò¦b:D
¤u§@ªí¥t¦s (2).zip (22.65 KB)
- Sub TSsheet2()
- Application.ScreenUpdating = 0
- Dim rng As Range, d As Object, ws As Worksheet
- Set ws = ActiveSheet
- ws.AutoFilterMode = False
- c = [a5].CurrentRegion.Columns.Count
- Set d = CreateObject("scripting.dictionary")
- Set rng = Range([a5], Cells(Cells(Rows.Count, 1).End(1).Row, c))
- a = rng.Columns(3)
- For i = 2 To UBound(a)
- d(a(i, 1)) = ""
- Next
- k = d.keys
- For i = 0 To UBound(k)
- ws.Copy after:=Sheets(Sheets.Count)
- ActiveSheet.AutoFilterMode = False
- [a5].CurrentRegion.Clear
- With ws
- rng.AutoFilter Field:=1, Criteria1:=k(i)
- .[a5].CurrentRegion.Copy [a5]
-
- End With
-
- ActiveSheet.Name = [A6].Value
- Next
- Application.ScreenUpdating = 1
- With Sheets("data").Activate
- If ActiveSheet.FilterMode Then
- ActiveSheet.ShowAllData
- End If
-
- End With
- End Sub
½Æ»s¥N½X |