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

[µo°Ý] Ãö©óUnionªº¥Îªk¤Î­×§ï¡A¨â­Ó°ÝÃD½Ð±Ð

[µo°Ý] Ãö©óUnionªº¥Îªk¤Î­×§ï¡A¨â­Ó°ÝÃD½Ð±Ð

¥»©«³Ì«á¥Ñ chiang0320 ©ó 2016-11-7 00:04 ½s¿è

1.jpg 3.jpg
Union(1).zip (12.98 KB)

¨â­Ó°ÝÃD½Ð±Ð¦Ñ®v±Ð¾É¡AÁÂÁÂ!
¥H¤Uvbaµ{¦¡½X¡A±ø¥ó--->±N¤j©ó30ªºÀx¦s®æ¿ï¨ú
1. «ç»ò­×§ï¦¨¿ï¨ú  "¾ã¦C(rows) "
2. ¦pªG±ø¥ó§ï¦¨¤p©ó2ªºÀx¦s®æ¿ï¨ú¡A·|Åã¥Ü¿ù»~¡A  "½Ð°Ý«ç»ò­×§ï¦¨¡A¦pªG¨S¦³¦b±ø¥ó¤ºªº¸ê®Æ«h¸õ¹L"

Public Sub QQQ()

Dim i As Long, Target As Range
For i = 2 To 11
    If Cells(i, "B") > 30 Then
       If Target Is Nothing Then
          Set Target = Cells(i, "B")
     Else
          Set Target = Union(Target, Cells(i, "B"))
     End If
  End If
Next
Target.Select
End Sub

¦^´_ 1# chiang0320
´£°Ý¡G "2. ¦pªG±ø¥ó§ï¦¨¤p©ó2ªºÀx¦s®æ¿ï¨ú¡A·|Åã¥Ü¿ù»~"
·Ó§A¼gªº»yªk¬Ý¨Ó¤@©w·|¥X°ÝÃDªº¡A¦]¬°§Aªº "B Äæ¦ì" ¤¤
¨ÃµL±ø¥ó¤p©ó2 ªº COUNT¡A ©Ò¥H Target Åܼƫh±q«Å§i¬°
Range «á¤@ª½¨ì°j°éµ²§ô¡A¥¼¸g²§°Ê (³B²z)¡A¨ÌµM«O¯d¬°¨äªì©l­È¡C
±µµÛ·í§A°õ¦æ Target.Select ®É¡A«h¤@©w·|²£¥Í¿ù»~°T®§¡C ±N
  1.     Target.Select
½Æ»s¥N½X
§ï¦¨
  1.     If Not Target Is Nothing Then Target.Select
½Æ»s¥N½X
¦Ü©ó±N   Target  Äæ§ï¦¨³]©w¬°¦C¡G
  1.             If Target Is Nothing Then
  2.                 Set Target = Cells(i, "B")
  3.             Else
  4.                 Set Target = Union(Target, Cells(i, "B"))
  5.             End If
½Æ»s¥N½X
´«¦¨
  1.             If Target Is Nothing Then
  2.                 Set Target = Rows(i)
  3.             Else
  4.                 Set Target = Union(Target, Rows(i))
  5.             End If
½Æ»s¥N½X
´N¥i¦æ¤F¡C

TOP

¦^´_ 1# chiang0320
­×¥¿«á¡G
  1. Sub QQQ()
  2.     Dim i As Long, Target As Range
  3.    
  4.     For i = 2 To 11
  5.         If Cells(i, "B") > 30 Then
  6.             If Target Is Nothing Then
  7.                 Set Target = Rows(i)
  8.             Else
  9.                 Set Target = Union(Target, Rows(i))
  10.             End If
  11.         End If
  12.     Next
  13.     If Not Target Is Nothing Then Target.Select
  14. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# chiang0320
1. «ç»ò­×§ï¦¨¿ï¨ú  "¾ã¦C(rows) "
¥i­×§ï¦p¤U
  1. Option Explicit
  2. Sub QQQ()
  3.     Dim i As Long, Target As Range, Rng As Range
  4.     Set Rng = Range("A1").CurrentRegion.Rows '** ªþÀɸê®Æªº½d³òªºªº©Ò¦³¦C
  5.     For i = 2 To 11
  6.         If Rng(i).Cells(2) < 2 Then
  7.         'If Rng.Range("B" & i) < 2 Then '** ¤]¥i¥H
  8.             If Target Is Nothing Then
  9.                 Set Target = Rng(i)
  10.             Else
  11.                 Set Target = Union(Target, Rng(i))
  12.             End If
  13.         End If
  14.     Next
  15.     If Not Target Is Nothing Then Target.Select
  16. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# GBKEE
¤£¿ùªº¸àÄÀ¡AÁÂÁ«ü¾É¡I

TOP

¦^´_ 1# chiang0320


·PÁ GBKEE ¤Î c_c_lai ¨â¦ì«e½úªº«ü¾É¡AÁÂÁÂ!

TOP

        ÀR«ä¦Û¦b : ¹D¼w¬O´£ª@¦Û§Úªº©ú¿O¡A¤£¸Ó¬O¨þ¥¸§O¤HªºÃ@¤l¡C
ªð¦^¦Cªí ¤W¤@¥DÃD