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

[µo°Ý] ²Õ¦X¦h­Ó¼Æ²Õ

[µo°Ý] ²Õ¦X¦h­Ó¼Æ²Õ

³Ìªñ¶·±N¤j¶qªº³æ¾Úªº¸ê®ÆŪ¤J¡A
¦P¤@ÀÉ 31 ±i¤À­¶¡A¨C­¶¦³¤T­Ó©Î¥H¤W¤£¦Pªº¡u¦ì¸m¡vÀx¦s¼Æ¾Ú¡C

§Ú±Ä¥Î¦p¤U¤èªk¡A¨C¤@¤À­¶¥ý¦s¦¨¤£¦P¼Æ²Õ¡A
¦A³v¤@¤ÀªRÂà´«¡AµM«á¦A¼g¤JÀx¦s¡C

¦p¤U¨Ò¤l¤¤¡A§Ú­n¼g¤T­Ó°j°é¤ÀªR¡A
    r1 = Range("D5:N18")
    r2 = Range("D35:N48")
    r3 = Range("D65:N83")

°ÝÃD¡GÀ³¦p¦ó±N r1 ¡Br2 ¡Br3 ²Õ¦X¦¨¡u·s¼Æ²Õ r0¡v ¤¤¡H

¦^´_ 1# storylai


    ¤£ª¾¹D§A¾ãÅé¬yµ{¬°¦ó?
¦pªG³æ¯Â§â3­Ó°}¦C¥Î¤@­Ó°}¦Cªí¥Ü
   r1 = Range("D5:N18")
    r2 = Range("D35:N48")
    r3 = Range("D65:N83")
    r0=Array(r1,r2,r,3)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁ¦^ÂСA

¤u§@¬O³o¼Ëªº¡Ar1 r2 r3 ³£¬O¤@¨Ç³æ¾Ú¤º®e¡C

¦P¨Æ¨C¤Ñ¦C¦Lµ¹¥DºÞñ¡Ar1 r2 ¶¡·|¦³¤@¨Ç¨S¥Îªº¡u®æ¦¡¤å¦r¡v¡C

¥Ñ©ó­nÂЮ֥L­Ì¡A§Ú­n±N³o¨Ç¸ê®Æ§Û¨ì¥t¤@­Ó workbook ¤¤¤ÀªR¡A¬Ý¬Ý
¦³¨S¦³­«ÂСBº|³øµ¥¡C

¥Ø«eªº°µªk¬O¥ý³v¤@§Û r1 r2 r3 µ¥¨ì§Úªº  workbook  ¤¤¡AµM«á¦A³v¤@¤ÀªR¡C

¦Û¤v·Q¶i¶¥¡A§Q¥Î array ²Õ¦X¡B¤ÀªR¡A¦A§Û¤J¦Û¤wªº  workbook  ¤¤¡C

¯à¤O©Ò­­¡AµLªk±N¤TË¿ r1 r2 r3 ¦X¦¨¤@­Ó¡AÅܦ¨µLªk²Î¤@¤À§é¡C

§Ú¬O·Q¡A31­¶ªº r1 r2 r3 ¥ý¦X¦¨¤@­Ó array ¡AµM«á²Î¤@§Û¤J  workbook  ªº¤@±i sheet ¤¤¡A¦A¼g¨Ç±ø¥ó
¤ÀªR array¡A°µ¦n´N§Û¤J¥t¤@±i sheet ¤¤¡C

¥ýÁÂÁ¤F¡C

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-10-30 11:34 ½s¿è

¦^´_ 3# storylai
¥H§Aªººc«ä­n±N¼Æ­Ó¤Gºû°}¦C¦X¨Ö¦¨¤@­Ó°}¦C
¨º»ò¦¹·sªº°}¦C¥i´N¦¨¤F¤Tºû°}¦C
¨º»ò§A­n¦A¼g¤J¤u§@ªí®ÉµLªk¤@¦¸¼g¤J
©Ò¥H«Øij§A±N¤£¦P°Ï°ìª½±µ¼g¦¨¤@­Ó¤Gºû°}¦C
¦bŪ¨ú®É¤~·|²«K
  1. Sub nn()
  2. Dim Ar(), Ay As Variant, Rng As Range, s%
  3. Set Rng = Union(Range("D5:N18"), Range("D35:N48"), Range("D65:N83"))
  4. For i = 1 To Rng.Areas.Count
  5.    For j = 1 To Rng.Areas(i).Rows.Count
  6.      ReDim Preserve Ar(s)
  7.      Ar(s) = Rng.Areas(i).Rows(j)
  8.      s = s + 1
  9.    Next
  10. Next
  11. Ay = Application.Transpose(Application.Transpose(Ar))
  12. Sheet2.[A1].Resize(UBound(Ay, 1), UBound(Ay, 2)) = Ay
  13. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¹ï©ó¨ú©T©w°Ï°ì©Î³\¥i¥H·Q³æ¯Â¨Ç¡G
Sub nn()
Dim Rng As Range
Set Rng = Union(Range("D5:N18"), Range("D35:N48"), Range("D65:N83"))
Rng.Copy Sheet2.[a1]
End Sub

TOP

¦^´_ 5# oobird
oobirdª©¥D¦¹µ{§Ç¥i¦æªº
¦ý§A¨S»¡²M·¡¥²­nªº±ø¥ó¬O.©Ò¦³½d³òªº²Ä¤@Ä欰¥²¶·¬O¦P¤@Äæ¦ì,¥B¨C¤@­Ó½d³òªºÁ`Äæ¦ì¼Æ¬O­n¤@¼Ëªº.

TOP

ÁÂÁ¦^ÂСC

1- §Ú²{®É¥Îªº¤èªk»P oobird ¤j¤jªº®t¤£¦h¡C
    ³£¬O§Û¤@¥÷¦A¾ã®I¡C
    ¥u¬O·Q¸ÕµÛ¥Î array ªº¤èªk¨Ó¼W¶i¥\¤O¡C

2- ­n³B²zªº¸ê®Æ³£¬O¬Û¦PÄæ¦ìªº¡A¥u¬O»s§@ªº
    ¦P¨Æ¤£À´¦Ó·d½ÆÂø¤F¡C

TOP

        ÀR«ä¦Û¦b : ¤Ñ¤W³Ì¬ü¬O¬P¬P¡A¤H¥Í³Ì¬ü¬O·Å±¡¡C
ªð¦^¦Cªí ¤W¤@¥DÃD