- ©«¤l
- 216
- ¥DÃD
- 71
- ºëµØ
- 0
- ¿n¤À
- 292
- ÂI¦W
- 0
- §@·~¨t²Î
- window xp
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-6-27
- ³Ì«áµn¿ý
- 2024-9-28
|
¥»©«³Ì«á¥Ñ missbb ©ó 2018-6-11 19:32 ½s¿è
¤j¤jIKBOY§A¦n, §Ú±N§A«ü¾Éªº©ñ¤J¸û¦h¸ê®ÆªºEXCEL, ¦Û¤v¥[¤JÀ˵ø¸ê®Æªº§ï°Ê. ¦ý°õ¦æ®É¥X²{1004ªº¿ù»~, ½ÐÀ°¦£¬Ý¨º¸Ì¥X¿ù?
§Ú¬On¦bSHEET DATA¤§«á, «O¯d¤u§@ªí1¤Î¤u§@ªí¤G,§Y¤À³¡ªù·s¼Wªº¤u§@ªí, ¬On¦b¤u§@ªí¤G¤§«á·s¼W.
new.zip (37.07 KB)
- Sub sortingsavesheet2()
- 'use this , sorting dept then save individualsheet with deptname
- Application.ScreenUpdating = 0
- Dim rng As Range, d As Object, ws As Worksheet
- Set ws = ActiveSheet
- ws.AutoFilterMode = False
- c = [a3].CurrentRegion.Columns.Count
- Set d = CreateObject("scripting.dictionary")
- Set rng = Range([a5], Cells(Cells(Rows.Count, 1).End(3).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
- [a3].CurrentRegion.Clear
- With ws
- rng.AutoFilter Field:=3, Criteria1:=k(i)
- .[a3].CurrentRegion.Copy [a3]
-
- Range("F6").Select
- With ActiveWindow
- .SplitColumn = 5
- .SplitRow = 5
- End With
- ActiveWindow.FreezePanes = True
-
- End With
-
- ActiveSheet.Name = [c6].Value
- Next
- Application.ScreenUpdating = 1
- With Sheets("data").Activate
- If ActiveSheet.FilterMode Then
- ActiveSheet.ShowAllData
- End If
- [color=Red]'¦Û¦æ¥[¤Jáµ²µ¡¤Î³Ì«áªð¦^DATAªºF6[/color]
- Range("F6").Select
- With ActiveWindow
- .SplitColumn = 5
- .SplitRow = 5
- End With
- ActiveWindow.FreezePanes = True
-
- End With
- End Sub
½Æ»s¥N½X ¦^´_ 2# ikboy |
|