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

[µo°Ý] Offset ¨Ï¥Î°ÝÃD

[µo°Ý] Offset ¨Ï¥Î°ÝÃD

¥»©«³Ì«á¥Ñ ashelyyen ©ó 2015-8-13 10:45 ½s¿è

¤j®a¦n§Ú¬O­è¾ÇVBAªº·s¤â

³Ìªñ¦b¼¶¼gªº®É­Ô¹J¨ì¥H¤U°ÝÃD:
  1. Public Sub test_081114()
  2. Dim i As Integer
  3. For i = 2 To 12
  4.     Worksheets(i).Select
  5.     Range("b14:u23").Select
  6.     Selection.Copy
  7.     Worksheets("sheet1").Select
  8.     Range("c4").Select
  9.         If i = 2 Then
  10.             ActiveSheet.Paste
  11.         Else
  12.             Selection.End(xlDown).Select
  13.             ActiveCell.Offset(11, 0).Range("a1").Select
  14.             ActiveSheet.Paste
  15.         End If
  16. Next i
  17.         
  18. End Sub
½Æ»s¥N½X
§Ú·Q­n§âSheet2-Sheet12©T©w½d³òªº¸ê®Æpaste¨ìsheet1¡A¦Ó¥B¹j11¦æ§@¶K¤W°Ê§@
¤£¹Lµ{¦¡³£¥u¯à¶]¨ìSheet2 ¤§«á¥H¤U´NªÅ¥Õ¤F
¦ý¬O¦pªG§âOffset³]©w¦¨(1,0)¤S¥i¥H¶K§¹¥þ³¡ªº¸ê®Æ

·Q½Ð°Ý³o¬qµ{¦¡½X¥X²{¤F¤°»òbug¶Ü :L


·PÁ¦U¦ì~~~

¤j®a¦n§Ú¬O­è¾ÇVBAªº·s¤â

³Ìªñ¦b¼¶¼gªº®É­Ô¹J¨ì¥H¤U°ÝÃD:§Ú·Q­n§âSheet2-Sheet12©T©w½d³òªº¸ê®Æpaste¨ìs ...
ashelyyen µoªí©ó 2015-8-13 10:44


Selection.End(xlDown).Select
§ï¦¨¦p¤U
Worksheets("sheet1").Cells(65536, 3).End(xlUp).Select

TOP

¦^´_ 2# diolin


¦¨¥\¤F!!!  ÁÂÁ§A:D

¤£¹L¥i¥H½Ð°Ý¤@¤U¨Ï¥Î"Cells(65536, 3)" ³o­Ó¬O¤°»ò·N«ä©O~~~

TOP

¦^´_ 3# ashelyyen


    Cells(65536, 3)

65536 ¬O«üexcel2003ª©ªº³Ì«á¤@¦C
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD