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

[µo°Ý] VBA COUNT IF

  1. Sub nn()
  2. Dim Rng As Range
  3. With Sheet1
  4. r = Application.Max(.[A65536].End(xlUp).Row, .[C65536].End(xlUp).Row)
  5. For Each a In .Range("A2:A" & r)
  6.    If a.Offset(, 1) <> a.Offset(, 4) Then
  7.       If Rng Is Nothing Then
  8.          Set Rng = a.Resize(, 5)
  9.          Else
  10.          Set Rng = Union(Rng, a.Resize(, 5))
  11.          End If
  12.     End If
  13. Next
  14. End With
  15. Sheet2.Cells = ""
  16. Rng.Copy Sheet2.[A1]
  17. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 3# john2006168


    AÄæ¸òCÄæ¨ú¦h¼Æ¦C¦ì
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¤f»¡¦n¸Ü¡B¤ß·Q¦n·N¡B¨­¦æ¦n¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD