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

ActiveSheet.Range ¥i¥H³]©w ¦h­Ó¥ý«á±o¿zÅã±Æ§Ç¶Ü?

¥»©«³Ì«á¥Ñ GBKEE ©ó 2015-5-8 08:59 ½s¿è

¤j¤j §Ú¹J¨ì¤@­Ó°ÝÃD

¦pªG»¡¿z¿ï¥X¨Óªº¸ê®Æ ¨S¥b¤ñ¸ê®Æ ¥¨¶°·|¥X²{¿ù»~
°±¯d¦b   ActiveSheet.Paste ¸ò§A»¡¿ù»~ ¨º¸Ó«ç»ò­×§ï©O
ÁÂÁÂ

Sub ¥¨¶°9()
'
' ¥¨¶°9 ¥¨¶°
'



Dim row_s1 As Integer

'Àˬd¤u§@ªí1ªºBÄæ¤w¦³¸ê®Æ¦æ¼Æ
   row_s1 = Worksheets("¬ö¿ý-©P¦P¶b¶^").Range("B65535").End(xlUp).Row

'B1µL¸ê®Æ®É¡Arow_s1 =0
    If row_s1 = 1 Then
        If Cells(row_s1, 2) = "" Then
            row_s1 = 0
        End If
    End If
      
Sheets("¶°¦X").Select
   
' ActiveSheet.Range("$A$1:GZ$55586").AutoFilter Field:=2, Criteria1:= _
' xlFilterToday, Operator:=xlFilterDynamic

ActiveSheet.Range("$A$1:GZ$100000").AutoFilter Field:=18, Criteria1:="<=0"
ActiveSheet.Range("$A$1:GZ$100000").AutoFilter Field:=20, Criteria1:=">=1000"
ActiveSheet.Range("$A$1:GZ$100000").AutoFilter Field:=25, Criteria1:="<=0"
ActiveSheet.Range("$A$1:GZ$100000").AutoFilter Field:=26, Criteria1:="<=-2"
ActiveSheet.Range("$A$1:GZ$100000").AutoFilter Field:=15, Criteria1:="<=0"
ActiveSheet.Range("$A$1:GZ$100000").AutoFilter Field:=7, Criteria1:="<=0"
ActiveSheet.Range("$A$1:GZ$100000").AutoFilter Field:=6, Criteria1:="<=0"
ActiveSheet.Range("$A$1:GZ$100000").AutoFilter Field:=29, Criteria1:=">=50"
ActiveSheet.Range("$A$1:GZ$100000").AutoFilter Field:=30, Criteria1:=">=50"


    Range("a2:gz2").Select '²Ä¤GÄæa2~gz2
    Range(Selection, Selection.End(xlDown)).Select '¿ï¾Ü¨ì³Ì«á¤@Äæ
    Selection.Copy
    Worksheets("¬ö¿ý-adxr¶^").Select
    Cells(row_s1 + 1, 2).Select
    ActiveSheet.Paste
     
   Sheets("¶°¦X").Select
ActiveSheet.ShowAllData
   
End Sub

TOP

¦^´_ 11# vavashop
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub ¥¨¶°9()
  3.     Dim row_s1 As Integer
  4.     'Àˬd¤u§@ªí1ªºBÄæ¤w¦³¸ê®Æ¦æ¼Æ
  5.     With Worksheets("¬ö¿ý-©P¦P¶b¶^")
  6.         row_s1 = .Range("B65535").End(xlUp).Row
  7.         'B1µL¸ê®Æ®É¡Arow_s1 =0
  8.         If row_s1 = 1 Then
  9.             If .Cells(row_s1, 2) = "" Then
  10.                 row_s1 = 0
  11.             End If
  12.         End If
  13.     End With
  14.     With Sheets("¶°¦X")
  15.     ' ActiveSheet.Range("$A$1GZ$55586").AutoFilter Field:=2, Criteria1:= _
  16.     ' xlFilterToday, Operator:=xlFilterDynamic
  17.         With .Range("A1:GZ100000")
  18.             .AutoFilter Field:=18, Criteria1:="<=0"
  19.             .AutoFilter Field:=20, Criteria1:=">=1000"
  20.             .AutoFilter Field:=25, Criteria1:="<=0"
  21.             .AutoFilter Field:=26, Criteria1:="<=-2"
  22.             .AutoFilter Field:=15, Criteria1:="<=0"
  23.             .AutoFilter Field:=7, Criteria1:="<=0"
  24.             .AutoFilter Field:=6, Criteria1:="<=0"
  25.             .AutoFilter Field:=29, Criteria1:=">=50"
  26.             .AutoFilter Field:=30, Criteria1:=">=50"
  27.         End With
  28.          'Range("a2:gz2").Select '²Ä¤GÄæa2~gz2
  29.         .Range(.Range("a2:gz2"), .Range("a2:gz2").End(xlDown)).Copy Worksheets("¬ö¿ý-adxr¶^").Cells(row_s1 + 1, 2)
  30.         '¿ï¾Ü¨ì³Ì«á¤@Äæ
  31.         '.Selection.Copy
  32.         'Worksheets("¬ö¿ý-adxr¶^").Select
  33.         'Worksheets("¬ö¿ý-adxr¶^").Cells(row_s1 + 1, 1).Select
  34.         'ActiveSheet.Paste
  35.         .Select
  36.         .ShowAllData
  37.     End With
  38. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤Hªº§Ö¼Ö¡D¤£¬O¦]¬°¥L¾Ö¦³±o¦h¡A¦Ó¬O¦]¬°¥L­p¸û±o¤Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD