ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°Ý¤£¦Psheetªº³B²z-¥¨¶°­n¦p¦ó²¤Æ?(¤w¸Ñ¨M)

[µo°Ý] ½Ð°Ý¤£¦Psheetªº³B²z-¥¨¶°­n¦p¦ó²¤Æ?(¤w¸Ñ¨M)

¥»©«³Ì«á¥Ñ ´Ñ»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©ÎªÌ§ó¦h­n¦p¦ó²¤Æ¨ä¥¨¶°???
ps.¥H¤Wsheet¦WºÙ³£¬Û¦P¥u¦³«á­±½s¸¹¤£¦P¦Ó¤w!
  1. Sheets("test1").Select
  2.     Range("A2:E2").Select
  3.     Selection.AutoFilter
  4.     Range("A2").Select
  5.     ActiveWorkbook.Worksheets("test1").AutoFilter.Sort.SortFields.Clear
  6.     ActiveWorkbook.Worksheets("test1").AutoFilter.Sort.SortFields.Add Key:= _
  7.         Range("A2"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
  8.         xlSortNormal
  9.     With ActiveWorkbook.Worksheets("test1").AutoFilter.Sort
  10.         .Header = xlYes
  11.         .MatchCase = False
  12.         .Orientation = xlTopToBottom
  13.         .SortMethod = xlPinYin
  14.         .Apply
  15.     End With
  16.     Range("E2").Select
  17.     ActiveWorkbook.Worksheets("test1").AutoFilter.Sort.SortFields.Clear
  18.     ActiveWorkbook.Worksheets("test1").AutoFilter.Sort.SortFields.Add(Range("E2") _
  19.         , xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(255, _
  20.         199, 206)
  21.     With ActiveWorkbook.Worksheets("test1").AutoFilter.Sort
  22.         .Header = xlYes
  23.         .MatchCase = False
  24.         .Orientation = xlTopToBottom
  25.         .SortMethod = xlPinYin
  26.         .Apply
  27.     End With
  28.     Selection.AutoFilter
  29.     Range("A1").Select
  30.     Sheets("test2").Select
  31.     Range("A2:E2").Select
  32.     Selection.AutoFilter
  33.     Range("A2").Select
  34.     ActiveWorkbook.Worksheets("test2").AutoFilter.Sort.SortFields.Clear
  35.     ActiveWorkbook.Worksheets("test2").AutoFilter.Sort.SortFields.Add Key:= _
  36.         Range("A2"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
  37.         xlSortNormal
  38.     With ActiveWorkbook.Worksheets("test2").AutoFilter.Sort
  39.         .Header = xlYes
  40.         .MatchCase = False
  41.         .Orientation = xlTopToBottom
  42.         .SortMethod = xlPinYin
  43.         .Apply
  44.     End With
  45.     Range("E2").Select
  46.     ActiveWorkbook.Worksheets("test2").AutoFilter.Sort.SortFields.Clear
  47.     ActiveWorkbook.Worksheets("test2").AutoFilter.Sort.SortFields.Add(Range("E2") _
  48.         , xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(255, _
  49.         199, 206)
  50.     With ActiveWorkbook.Worksheets("test2").AutoFilter.Sort
  51.         .Header = xlYes
  52.         .MatchCase = False
  53.         .Orientation = xlTopToBottom
  54.         .SortMethod = xlPinYin
  55.         .Apply
  56.     End With
½Æ»s¥N½X

for i = 1 to 30'³Ì«e­±¥[¤W³o­Ó´`Àô«ü¥O
Sheets("test" & i).Select
©Ò¦³
("test1")³£§ï¬°("test" & i)
³Ì«á¥[¤@­Ónext

TOP

¦^´_ 2# oobird
­ì¨Ó§Ú¤§«e¥Î¨ìSheets(""test" & i").Select<==¦h¥Î¤F" "Ãø©Ç¤@ª½¿ù»~!¡AÁÂÁ±zªº«ü¾É~Åý§Úª¾¹D§Úªº¿ù»~¦b­þ¤F!
´`Àô«ü¥O~¯u¬O­Ó¦n¥ÎªºªF¦è~~

TOP

        ÀR«ä¦Û¦b : ÀR§¤±`®¦¤v¹L¡B¶¢½Í²ö½×¤H«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD