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

[µo°Ý] ¦p¦ó¦X¨Ö°}¦C

¦^´_ 8# Hsieh

½Ð°Ý¬°¦ó­n¥Î 2­Ó Application.Transpose(Application.Transpose(A)) ¨ÓÂà?
  1. A1].Resize(UBound(A) + 1, 3) = Application.Transpose(Application.Transpose(A)) '°}¦CA¼g¤J¤u§@ªí
½Æ»s¥N½X
·íµM§Ú´ú¸Õ¤F¤@¤U A1].Resize(UBound(A) + 1, 3) = A¡A³o¥N½X¨S¦³¼g¦^¤u§@ªí

§Ú¼g¤@­Ó¤p¨Ò¤l¦p¤U¡A¤£¥ÎApplication.Transpose(Application.Transpose(A))«o¥i¥H¼g¦^¤u§@ªí¡A
½Ð°Ý¤§¶¡ªº®t²§¬O¤°»ò?
  1. Sub test2()
  2. A = Evaluate("{""A1"",""B1"",""C1"";""A2"",""B2"",""C2"";""A3"",""B3"",""C3""}")
  3. [A1:F6] = ""
  4. [A1].Resize(3, 3) = A
  5. End Sub
½Æ»s¥N½X
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 11# ML089
  1. Option Base 0   'Option Base ³¯­z¦¡  ¦b¼Ò²Õ¼h¦¸¤¤¥Î¨Ó«Å§i°}¦C¯Á¤Þªº¹w³]¤U­­
  2. Sub Ex()
  3.     Dim A As Variant, B As Variant, C As Variant, i As Integer
  4.     'Àx¦s®æªº½d³ò = ¬O¤@­Ó¤Gºû°}¦C ,¥¦ªº¯Á¤Þªº¹w³]¤U­­¬O 1.
  5.     A = Array(Array("A1", "B1", "C1"), Array("A2", "B2", "C2"), Array("A3", "B3", "C3"))
  6.     'A¬°¤@ºû°}¦C: ¤¸¯À¤]¬O¤@ºû°}¦C
  7.     [I1] = "AµLªk¸m¤J"
  8.     [I2].Resize(3, 3) = A
  9.     '*** ¤£Âà¸m  ªº¼gªk **************
  10.     [E1] = "¤£Âà¸m  ªº¼gªk"
  11.     For i = 0 To UBound(A)
  12.         [E1].Offset(i + 1).Resize(1, 3) = A(i)
  13.     Next
  14.     '********************************
  15.     B = Application.Transpose(A)                     'Âà¸m¤@¦¸¥i¥H ¤@¦¸¼g¤J A °}¦C©óÀx¦s®æ
  16.     '****Âà¸m«áªº°}¦C  ¤U­­¬O 1 ¶}©l¤£¥Î +1
  17.     [A1].Resize(UBound(B), UBound(B, 2)) = B
  18.     [A1].End(xlDown).Offset(1) = "²Ä¤G¦¸Âà¸m*"
  19.     C = Application.Transpose(Application.Transpose(A))
  20.     [A1].End(xlDown).Offset(1).Resize(UBound(A) + 1, 3) = C
  21.    Stop '¬Ý¬ÝÅܼÆ
  22. End Sub
  23. Sub Ex__A()
  24.     '¦C = ¤@ºû°}¦C
  25.     Cells.Clear
  26.     A = Array("A1", "B1", "C1")
  27.     [A1:C1] = A
  28.     B = Application.Transpose(A)
  29.     [a5:A7] = B
  30. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 12# GBKEE

¦³ÂI¤£¤ÓÀ´¡A½Ð¬Ý¬Ý§Úªº²z¸Ñ¬O§_¥¿½T

A = Array(Array("A1", "B1", "C1"), Array("A2", "B2", "C2"), Array("A3", "B3", "C3"))
·í [A1:C3]=A ®É¡A½d³òÀx¦s®æµøA¬°¤@ºû°}¦C¡A¥i¬O¨C­Ó°}¦C¨ä¹ê¤S¬O¬°¤@­Ó¤@ºû°}¦C¡A©Ò¥H¤@­ÓÀx¦s®æ¥u¯à©ñ¤J¤@­Ó­È¨S¦³¿ìªkÀx¦s¤@²Õ°}¦C¡A©Ò¥HµLªkÅã¥Ü

B = Application.Transpose(A)  ©Î B = Application.Transpose(Application.Transpose(A)) ®É¡A·|Åܦ¨¤Gºû°}¦C¡A©Ò¥H½d³òÀx¦s®æ´N¥i¥H±µ¨ü¼g¤J°}¦C­È¡C

A = Array("A1", "B1", "C1")
·í [A1:C3]=A ®É¡A½d³òÀx¦s®æµøA¬°¤@ºû°}¦C¡A¨C°}¦C¥u¦³¤@­È©Ò¦³¥i¥H¼g¤J
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 13# ML089
12#µ{¦¡½X¨S»¡²M·¡
  1. 24.    '¦C = ¤@ºû°}¦C
½Æ»s¥N½X
²M·¡¤@ÂIÀ³¸Ó¬O: ³æ¦C(A1:F1)ªºÀx¦s®æ½d³ò = ¤@ºû°}¦C, ³æ¦C¥H¤W(A1:F5)ªºÀx¦s®æ½d³ò = ¤Gºû°}¦C
¦h½m²ß¼ô±x´N·|¤F¸Ñ
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ReDim Preserve ®Ä²v¤£¦n¡A«Øij¥uÂX¤j¤@¦¸§¹¦¨¡A¤£­n©ñ¤J°j°é¡C

°²³]°}¦C±q1¶}©l
ReDim Preserve C(UBound(C)+UBound(B))

TOP

        ÀR«ä¦Û¦b : «H¤ß¡B¼Ý¤O¡B«i®ð¤TªÌ¨ã³Æ¡A«h¤Ñ¤U¨S¦³°µ¤£¦¨ªº¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD