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

½Ð±Ð¥¨¶°ªº»y·N

½Ð±Ð¥¨¶°ªº»y·N

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-7-22 10:20 ½s¿è

¦U¦ì¥ý¶i¦n¡I
½Ð±Ð¤U¦C¦¡¤l¤¤¡ASet B¤ÎA.Offset(, 2)³o¤G¦æªº·N«ä¬°¦ó¡H

With Sheets(Sh)
If Application.CountA(.Range("B7:B65536")) = 0 Then
    For Each A In .Range(.[B7], .[B65536].End(xlUp))
      With Sheets(Dh)
       d(A.Value) = d(A.Value) + 1
      Set B = .Columns("A").Find(A, lookat:=xlWhole).Offset(, 6)
      A.Offset(, 2).Resize(, 24).Copy B.Offset(d(A.Value), 0)
     
     End With
    Next A
  End If
End With

«D±`·PÁÂ

¦^´_ 1# b9208


    Set B = .Columns("A").Find(A, lookat:=xlWhole).Offset(, 6)'¦baÄæ§ä¨ìA­Èªº¦ì¸m¦V¥k6®æªº¦ì¸m³]µ¹ÅܼÆB
      A.Offset(, 2).Resize(, 24).Copy B.Offset(d(A.Value), 0)   'AÀx¦s®æ¦V¥k2®æÂX®i¦¨1¦C24Äæ½d³ò½Æ»s¨ìBÀx¦s®æ¦V¤U¦ì²¾d(A.Value),¦Cªº¦ì¸m
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-7-22 10:24 ½s¿è

¦^´_ 1# b9208
±Nª«¥óªº¤Þ¥Î«ü©wµ¹ÅܼƠ ¥²¶·¥Î Set ¶}ÀY
¨Ò Set A=Sheets("sheet1").Range("B2:B10")  «ü©wµ¹ÅܼÆA ¬°Sheets("sheet1").Range("B2:B10")ªº½d³ò
Offset ¶Ç¦^®Ú¾Ú©Ò«ü©wªºÀx¦s®æ¦ì§}¡B¦C¶Z¤ÎÄæ¶Z¦Óºâ¥Xªº°Ñ·Ó¦ì§}  ¤]´N¬O®Ú¾Ú©Ò«ü©wªºÀx¦s®æ¦ì§}ªº¦ì²¾
¸Õ¸Õ¤U¦Cµ{§ÇÀ³¥i©ú¼I
Sub Ex()
    Set A = Sheets("sheet1").Range("B2:B10")
    MsgBox A.Offset(1, 2).Address  '1¬°¦C¶Z 2¬°Äæ¶Z
End Sub

TOP

«D±`·PÁ¤G¦ì«e½ú«ü¾É
Set B = .Columns("A")³o¸ÌA¬O«ü Sheets(Sh)¤ºÀx¦s®æ)
A.Offset...(³o¸ÌA¬O«ü Sheets(Sh)¤ºÀx¦s®æ¸ê®Æ) .Copy B.Offset (³o¸ÌB¬O«ü Sheets(Dh)¤ºRange)
ÁÂÁÂ

TOP

«D±`·PÁ¤G¦ì«e½ú«ü¾É
Set B = .Columns("A")³o¸ÌA¬O«ü Sheets(Sh)¤ºÀx¦s®æ)
A.Offset...(³o¸ÌA¬O«ü Shee ...
b9208 µoªí©ó 2010-5-27 17:43



   ¿ù!
Set B = .Columns("A")¬OWith Sheets("Dh")°Ï¬q¤ºªº±Ô­z
.Columns("A")´N¬O Sheets("Dh").Columns("A")ªº·N«ä
¬OSheets("Dh")ªºAÄæ
A.Offset³o¸ÌªºA¬OSheets("Sh").Range(.[B7], .[B65536].End(xlUp))ªº¨C¤@®æ
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Set B = .Columns("A").Find(A, lookat:=xlWhole).Offset(, 6)
'¦baÄæ§ä¨ìA­Èªº¦ì¸m¦V¥k6®æªº¦ì¸m³]µ¹ÅܼÆB
¤W­z¤¤¡ªaÄ桪¤Î¡ªA­È¡ª³£¬O¦bWith Sheets("Dh")°Ï¬q¤º¶Ü¡H
¤£²z¸Ñ¡ª¦baÄæ§ä¨ìA­Èªº¦ì¸m¡ª

TOP

¦^´_ 6# b9208


    With Sheets(Sh)
If Application.CountA(.Range("B7:B65536")) = 0 Then
    For Each A In .Range(.[B7], .[B65536].End(xlUp))

      With Sheets(Dh)
      d(A.Value) = d(A.Value) + 1
      Set B = .Columns("A").Find(A, lookat:=xlWhole).Offset(, 6)
      A.Offset(, 2).Resize(, 24).Copy B.Offset(d(A.Value), 0)      
      End With

    Next A
  End If
End With
¬õ¦r¬OSheets(Dh)°Ï¬q
ÂŦâ¦r¬OSheets(Sh)°Ï¬q
©Ò¥HFor Each A In .Range(.[B7], .[B65536].End(xlUp))
³o­ÓA¬OÅܼƬOSheets(Sh).Range(.[B7], .[B65536].End(xlUp))ªº¨C­ÓÀx¦s®æ
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

·PÁ«ü¾É
§Ú§â Columns("A") »P Each A¡A«eªÌAÄæ¡A«áªÌÅܼÆA¡C
¦p§âÅܼÆA§ï¬°ÅܼÆH¡AÀ³¸Ó¤ñ¸û²M·¡¡C
With Sheets(Sh)
If Application.CountA(.Range("B7:B65536")) = 0 Then
    For Each H In .Range(.[B7], .[B65536].End(xlUp))
      With Sheets(Dh)
      d(H.Value) = d(H.Value) + 1
      Set B = .Columns("A").Find(H, lookat:=xlWhole).Offset(, 6)
      H.Offset(, 2).Resize(, 24).Copy B.Offset(d(H.Value), 0)      
      End With
    Next H
  End If
End With

TOP

        ÀR«ä¦Û¦b : ¡i¦æµ½­n¤Î®É¡j¦æµ½­n¤Î®É¡A¥\¼w­n«ùÄò¡C¦p¿N¶}¤ô¤@¯ë¡A¥¼¿N¶}¤§«e¤d¸U¤£­n°±º¶¤õ­Ô¡A§_«h­«¨Ó´N¤Ó¶O¨Æ¤F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD