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

[µo°Ý] ¨âÄ椣¦P¸ê®Æ¦X¨Ö

¥»©«³Ì«á¥Ñ yangjie ©ó 2013-12-25 14:34 ½s¿è

¦^´_ 1# li_hsien

¸Õ¸Õ¬Ý
sub test1()
    Dim d As Object, a
    Set d = CreateObject("Scripting.Dictionary")
    With Sheets(1)
            For Each a1 In .Range(.Cells(2, 1), .Cells(65536, 1).End(xlUp))
                d(a1.Value) = ""
            Next
            n1 = d.Count
           For Each a1 In .Range(.Cells(2, 2), .Cells(65536, 2).End(xlUp))
                d(a1.Value) = ""
           Next
           n2 = d.Count
           If n2 =n1  Then exit sub
          a = d.keys
           k = .Cells(65536, 1).End(xlUp).Row
          For I = n1 + 1 To n2
                .Cells(k + 1, 1) = a(I - 1)
                k = k + 1
          Next
    End With
     
end sub

TOP

        ÀR«ä¦Û¦b : ¶¢¤HµL¼Ö½ì¡A¦£¤HµL¬O«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD