- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2013-5-18 09:18 ½s¿è
¦^´_ 7# sunnyso
¦^´_ 5# GBKEE
¦^´_ 8# Hsieh
ÁÂÁ GBKEE ¥H¤Î Hsieh ¨â¦ì¤j¤jªº½d¨Ò¡C
¯÷±N¥¦Ìµyµy¤Þ¥Î¡G- Option Explicit
- Sub EX() ' GBKEE
- Dim A As Variant, B As Variant, C As Variant, I As Integer
- A = Array(Array("A1", "B1", "C1"), Array("A2", "B2", "C2") ,Array("A3", "B3", "C3"), Array("A4", "B4", "C4"))
- B = Array(Array("A5", "B5", "C5"), Array("A6", "B6", "C6"))
- C = A
- For I = 0 To UBound(B)
- ReDim Preserve C(0 To UBound(C) + 1)
- 'ReDim ³¯z¦¡ ¦bµ{§Ç¼h¦¸¤¤¥Î¨Ó«·s°t¸m°ÊºA°}¦CÅܼƪºÀx¦sªÅ¶¡¡C
- 'Preserve ·í§ïÅÜ즳°}¦C³Ì«á¤@ºûªº¤j¤p®É¡A¤´µM«O¦³ì¨Óªº¸ê®ÆªºÃöÁä¦r
- C(UBound(C)) = B(I)
- Next
- Range("A1").CurrentRegion = ""
- ' UBound(C) = 5, UBound(C(0)) = 2
- [A1].Resize(UBound(C) + 1, UBound(C(0)) + 1) = Application.Transpose(Application.Transpose(C)) ' °}¦CA¼g¤J¤u§@ªí
- End Sub
- Sub EX2() ' Hsieh
- Dim A As Variant, B As Variant, C As Variant, D As Variant, I As Integer
- Range("A1").CurrentRegion = ""
- A = Array(Array("A1", "B1", "C1"), Array("A2", "B2", "C2"), Array("A3", "B3", "C3"), Array("A4", "B4", "C4"))
- B = Array(Array("A5", "B5", "C5"), Array("A6", "B6", "C6"))
- ' UBound(A) = 3, UBound(A(0)) = 2
- [A1].Resize(UBound(A) + 1, UBound(A(0)) + 1) = Application.Transpose(Application.Transpose(A)) ' °}¦CA¼g¤J¤u§@ªí
- ' UBound(A) = 3, UBound(B) = 1, UBound(B(0)) = 2
- [A1].Offset(UBound(A) + 1).Resize(UBound(B) + 1, UBound(B(0)) + 1) = Application.Transpose(Application.Transpose(B)) ' °}¦CB¼g¤J¤u§@ªí
- D = Range("A1").CurrentRegion.Value ' ±NÀx¦s®æ¸ê®Æ¦s¦¨·s°}¦C
- Range("A1").CurrentRegion = ""
- ' UBound(D, 1) = 6, UBound(D, 2) = 3
- [A1].Resize(UBound(D, 1), UBound(D, 2)) = D ' ¼g¦^¤u§@ªí
- End Sub
½Æ»s¥N½X |
|