¥»©«³Ì«á¥Ñ ´Ñ»y³¾»ï ©ó 2011-8-23 06:27 ½s¿è
½Ð°Ý¤U¦C¥¨¶°¦p¦ó²¤Æ!¤À§O¦³30ÓSheets(test1~test30)°µ¦P¼Ëªº°Ê§@¡A¤U¦C¬°«e2ÓSheets(test1~test2)ªº¥¨¶°¡A¨ä¹ê¸Ì±®t§O¥u¦b©ósheet¦WºÙ¤£¦P¦Ó¤w!½Ð°Ý¦p¦³30ÓSheets©ÎªÌ§ó¦hn¦p¦ó²¤Æ¨ä¥¨¶°???
ps.¥H¤Wsheet¦WºÙ³£¬Û¦P¥u¦³«á±½s¸¹¤£¦P¦Ó¤w!- Sheets("test1").Select
- Range("A2:E2").Select
- Selection.AutoFilter
- Range("A2").Select
- ActiveWorkbook.Worksheets("test1").AutoFilter.Sort.SortFields.Clear
- ActiveWorkbook.Worksheets("test1").AutoFilter.Sort.SortFields.Add Key:= _
- Range("A2"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
- xlSortNormal
- With ActiveWorkbook.Worksheets("test1").AutoFilter.Sort
- .Header = xlYes
- .MatchCase = False
- .Orientation = xlTopToBottom
- .SortMethod = xlPinYin
- .Apply
- End With
- Range("E2").Select
- ActiveWorkbook.Worksheets("test1").AutoFilter.Sort.SortFields.Clear
- ActiveWorkbook.Worksheets("test1").AutoFilter.Sort.SortFields.Add(Range("E2") _
- , xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(255, _
- 199, 206)
- With ActiveWorkbook.Worksheets("test1").AutoFilter.Sort
- .Header = xlYes
- .MatchCase = False
- .Orientation = xlTopToBottom
- .SortMethod = xlPinYin
- .Apply
- End With
- Selection.AutoFilter
- Range("A1").Select
- Sheets("test2").Select
- Range("A2:E2").Select
- Selection.AutoFilter
- Range("A2").Select
- ActiveWorkbook.Worksheets("test2").AutoFilter.Sort.SortFields.Clear
- ActiveWorkbook.Worksheets("test2").AutoFilter.Sort.SortFields.Add Key:= _
- Range("A2"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
- xlSortNormal
- With ActiveWorkbook.Worksheets("test2").AutoFilter.Sort
- .Header = xlYes
- .MatchCase = False
- .Orientation = xlTopToBottom
- .SortMethod = xlPinYin
- .Apply
- End With
- Range("E2").Select
- ActiveWorkbook.Worksheets("test2").AutoFilter.Sort.SortFields.Clear
- ActiveWorkbook.Worksheets("test2").AutoFilter.Sort.SortFields.Add(Range("E2") _
- , xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(255, _
- 199, 206)
- With ActiveWorkbook.Worksheets("test2").AutoFilter.Sort
- .Header = xlYes
- .MatchCase = False
- .Orientation = xlTopToBottom
- .SortMethod = xlPinYin
- .Apply
- End With
½Æ»s¥N½X |