- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¥»©«³Ì«á¥Ñ luhpro ©ó 2020-12-28 21:43 ½s¿è
¦^´_ ã´£³¡ªL
¤£¦n·N«ä¡A§ÚÂà¾×¤F¨Ã¦A¤W¶Ç¡A³Â·Ð¤F
lovenice831 µoªí©ó 2020-12-28 10:49
§Úı±o§Aªºµ{¦¡°ÝÃDÀ³¸Ó¤£¦b¨º¸Ì³á.
¥H¤U¬Oµ{¦¡¤º®e:- Sub Monthly()
- Dim xS As Worksheet, T$, i&, xE As Range
- Call clean
- Set xS = Sheets("Monthly")
- If xS.[j2] = "" Then MsgBox "please choose! ": Exit Sub
- For i = 1 To 3
- With Sheets(1)
- If .FilterMode Then .ShowAllData
- .[c8].AutoFilter Field:=1, Criteria1:=xS.[j2]
- Set xE = xS.Cells(Rows.Count, 1).End(xlUp)(5)
- .AutoFilter.Range.Offset(1, 2).Resize(, 30).Copy xE
- .ShowAllData
- End With
- Next i
- End Sub
½Æ»s¥N½X §Ú·Q°ÝÃDÀ³¸Ó¦b©ó :
.[c8].AutoFilter Field:=1, Criteria1:=xS.[j2] «á±ªº Criteria1:=xS.[j2],
§Aªº¿z¿ïÁäȳ£¬O¬Û¦Pªº(¦]¬°xSªº[j2]ªºÈ¤£·|ÅÜ,¦bµ{¦¡¤¤³o®æ¤l¤ºªºÈ¥²¶·¥ÑUser¤â°Ê°µÅܧó)
·íªì´N¤£¤Ó¤F¸Ñ§A3Ó°j°é«ç»ò³£¬O§ì¬Û¦Pªº¸ê®Æ?
²{¦b¨Ì§Aªº±Ôz,
§Ú·Q§A§ï¦¨³o¼Ë¸Õ¸Õ:
Dim xS As Worksheet, T$, i&, xE As Range, vPro()
vPro = Array("A", "B", "C")
......
For i = 0 To 2
......
.[c8].AutoFilter Field:=1, Criteria1:=vPro(i) |
|