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

·Q½Ð°Ý¤j¤j¦p¦ó§âÀx¦s®æ¸ê®Æ¹ï´«¡H

·Q½Ð°Ý¤j¤j¦p¦ó§âÀx¦s®æ¸ê®Æ¹ï´«¡H

½Ð°Ý¤j¤j­Ì¡A
    §Ú¦³¤@¥÷excelªí®æ¡A°²³]©Ò¦ûªº¦ì¸m¬°a1:c10(¦@3Äæ10¦C)¡A§Ú¥i§_¥Îµ{¦¡±±¨î¡A±N¯S©wªº¡§¨â¦C¡¨¸ê®Æ¹ï½Õ¡C
¨Ò¦p¡GA1:A3»PC1:C10¾ã¦C¹ï´«¡C

¥»©«³Ì«á¥Ñ mark15jill ©ó 2011-11-16 17:27 ½s¿è

¤èªk1..
¦p A1:A3»PC1:C10¾ã¦C¹ï´«  (³oÀ³¸Ó¬O ¾ãÄæ§a
¥ý±N A1:A3 ½Æ»s¨ì D1¨ìD3
¦b§âC1:C10  ½Æ»s¨ì A1:A3
§âD1¨ìD3 ¶K¨ì C1:C10..

¤èªk2¡G
AÄæ½Æ»s¨ì DÄæ
CÄæ°Å¤U¶K¤W¨ìAÄæ
DÄæ°Å¤U¶K¤W¨ìCÄæ


²³æ­ì©l½X¦p¤U
  1. Sub Macro1()
  2. '
  3. ' Macro1 Macro
  4. '
  5. ' §Ö³tÁä: Ctrl+Shift+R
  6. '
  7.     Columns("A:A").Select
  8.     Selection.Copy
  9.     Columns("D:D").Select
  10.     ActiveSheet.Paste
  11.     Columns("C:C").Select
  12.     Application.CutCopyMode = False
  13.     Selection.Copy
  14.     Columns("A:A").Select
  15.     ActiveSheet.Paste
  16.     Columns("D:D").Select
  17.     Application.CutCopyMode = False
  18.     Selection.Copy
  19.     Columns("C:C").Select
  20.     ActiveSheet.Paste
  21.     Columns("D:D").Select
  22.     Application.CutCopyMode = False
  23.     Selection.ClearContents
  24. End Sub
  25. Sub Macro2()
  26. '
  27. ' Macro2 Macro
  28. '
  29. ' §Ö³tÁä: Ctrl+Shift+T
  30. '
  31.     Range("A1:A3").Select
  32.     Selection.Copy
  33.     Range("D1").Select
  34.     ActiveSheet.Paste
  35.     Range("C1:C10").Select
  36.     Application.CutCopyMode = False
  37.     Selection.Copy
  38.     Range("A1").Select
  39.     ActiveSheet.Paste
  40.     Range("D1:D3").Select
  41.     Application.CutCopyMode = False
  42.     Selection.Copy
  43.     Range("C1").Select
  44.     ActiveSheet.Paste
  45.     Range("D1:D4").Select
  46.     Application.CutCopyMode = False
  47.     Selection.ClearContents
  48. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ tku0216 ©ó 2011-11-16 18:01 ½s¿è

¦hÁ«üÂI¡A¤£¹L³oÀ³¸Ó¬O¥Î¿ý»s¥¨¶°ªº¤è¦¡§¹¦¨ªº¡A¬O§_¦³§ó¦nªº¿ìªk©O¡H¦]¬°­Y¬O»Ý­n½Õ´«ªºÀx¦s®æ¤£¥u¬O§Ú°ÝÃD©Ò°Ýªº¡A¦Ó¬O»Ý­n¥Ñ¨Ï¥ÎªÌ¦Û¦æ¿ï¾Ü¡A¨º´N¤£¦X¥Î¤F¡C

TOP

¦^´_ 3# tku0216
A1:A3»PC1:C10¾ã¦C¹ï´«  ­n¦p¦ó´«ªk?
¬O³o¼Ë¶Ü? (¹ï´«)
  1.   Sub Ex()
  2.     Dim AR1, AR2
  3.     AR1 = [A1:A3]
  4.     AR2 = [C1:C3]
  5.     [A1:A3] = AR2
  6.     [C1:C3] = AR1
  7. End Sub
½Æ»s¥N½X

TOP

¦hÁª©¥D¤À¨É¡A§Ú¹ï³o­Ó¤½¦¡«Ü¦³¿³½ì¡A¦]¬°¥H§Ú¥H«e¼gµ{¦¡ªº¸gÅç¡A¤@¯ë¨Ó»¡³£»Ý­n³]©w¤@­Ó¼È¦s®æ¡A§â¸ê®Æ²¾¨ì¼È¦sªÅ¶¡¡A¦A¶i¦æ¹ï´«¡A¦ý¬O¬Ý°_¨Óexcel¦ü¥G¤£¥²¡C

ÁÙ¦³·Q½Ð±Ðª©¥D¡A¦pªG¨S¦³«ü©w­þ¨â¦C¡A¦Ó¬O¥Ñ¨Ï¥ÎªÌ¦Û¦æ¿ï¾Ü¡A¨º»òµ{¦¡¸Ó«ç»ò§ï¡H
(Ä´¦p¬O§_¥i¥H¿ï¾ÜB1:B3¥H¤ÎD13¡A«ö¤U«ö¶s¡A¨â¦C¹ï´«)

TOP

  1. Sub ¹ï´«()
  2. a = Range(Selection.Areas(1).Address)
  3. b = Range(Selection.Areas(2).Address)
  4. Range(Selection.Areas(1).Address) = b
  5. Range(Selection.Areas(2).Address) = a
  6. End Sub
½Æ»s¥N½X

TOP

ÁÂÁª©¥D¤À¨É¡A§Ú°¨¤W¥h¸Õ¸Õ¬Ý~~

TOP

¯uªº¬O¬Û·í¯«©_¡A·PÁ¦U¦ìÅý§Ú¤S¦h¾Ç¤F¤@©Û¡C

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD