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

[µo°Ý] °}¦Cªº­È©ñ¸m¨ìexcelªº°ÝÃD

¦^´_ 2# GBKEE


    ©êºp,¬O§Ú¨S»¡²M·¡,Á|¨Òªº¤£¤Ó¬¢·í

¶Wª©¤j¤j±zªº¤è¦¡¤]«Ü¦n
¦ý°²³]§Úªº°}¦C¨Ã¤£¬O¥Ñexcel©Ò²£¥Íªº
¦Ó¬O§Ú¦Û¤vµ¹¥Lªº
DIM AA(1 TO 10,1 TO 5)
µM«á±N¹Bºâ¹Lªº­È³£¿é¤J¨ì°}¦C¤º¤§«á

¦³¨S¦³¬Æ»ò¤è¦¡¥i¥H¤£³z¹L°j°é
ª½±µ±N°}¦C¤¤¬Y¤@¬qªº¸ê®Æ©ñ¸m¨ìexcel¤º
¥­±`³£¬Oª½±µ¨Ï¥Î[A1].RESIZE(1 TO 10,1 TO 5).VALUE=AA
¥i¬O¦pªG§Ú­nªº¥u¬OAA¸Ì­±ªº(3 TO 10, 3 TO 5)
³o¼Ë­n¦p¦ó¤@¦¸©ñ¨ìexcel¤º?
¦³¿ìªkÃþ¦ü[A1].RESIZE(1 TO 10,1 TO 5).VALUE=AA³oºØªº¤è¦¡¶Ü?
PKKO

TOP

¦^´_ 5# lpk187
¼Ó¥D¤£¬O»¡,¥i¦³¿ìªk¤£¥Îfor...next
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-6-21 16:34 ½s¿è

¦^´_ 4# GBKEE


  PKKOªº·N«ä¬ORng(1 to 20,1 to 10)¤w¸g¦³­È¤F¡A¤£¬O¦A¥h¨ú
With Range("D1").CurrentRegion
       Rng = .Cells(2, 3).Resize(15, 3).Value
    End With
ªº­È¡A¦Ó¥L¥u·Q§âRNG(2 TO 16,3 TO 5)½d³òªº­È¨ú¥X

TOP

¦^´_ 3# lpk187
¥u¨úRNG(2 TO 16,3 TO 5)¡A¥i¦³¿ìªk¤£¥Îfor...next

³o¤£¬O¤£¥Î°j°é?
  1. With Range("D1").CurrentRegion
  2.        Rng = .Cells(2, 3).Resize(15, 3).Value
  3.     End With
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-6-21 16:22 ½s¿è

¦^´_ 2# GBKEE


   §Ú·QPKKO¤j¤jªº·N«ä¬O¦³­ÓRng(1 to 20,1 to 10)ªº°}¦C
¦ý¥L¥u¨úRNG(2 TO 16,3 TO 5)½d³òªº­È¡A¥i¦³¿ìªk¤£¥Î¥ô¦ó°j°é
´N¥i¥Hª½±µ¨ú¥Xªº·N«ä

TOP

¦^´_ 1# PKKO
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub EX()
  3.     Dim Rng()
  4.     With Range("D1").CurrentRegion
  5.         Rng = .Cells(2, 3).Resize(15, 3).Value
  6.     End With
  7.     [A1].Resize(15, 3) = Rng
  8. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ­n¥Î¤ß¡A¤£­n¾Þ¤ß¡B·Ð¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD