- ©«¤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
|
¦^´_ 1# PKKO
³o¬O§ÚÓ¤Hªºª½Ä±³B²z¤è¦¡¡A¶È¨Ñ§A°µ°Ñ¦Ò¥Î¡I- Sub Ex2()
- ' rng = [A5].CurrentRegion '°²³]UBOUND(RNG)=20 ,UBOUND(RNG,2)=10
- ' Q1: [A1].Resize(20, 10).Value = rng '§Úı±o³o¬O±N°}¦C¸ê®Æ©ñ¦bexcel«D±`§Öªº¤è¦¡,¤£¾å±oÁÙ¦³§ó§ÖªºÀ¨?
- ' Q2 : ¦pªGRNG³oÓ°}¦C,§Ú§Æ±æ¥¦¥ÑRNG(2 TO 16,3 TO 5) ©ñ¨ì [A1].Resize(15, 3).Value³o¸Ì±¸Ó¦p¦ó°µ?¦]¬°¥Ø«eQ1µ{¦¡½XµLªk¹F¦¨³oºØ©ñ¸m¤è¦¡
- ' PS:¦³¨S¦³µª®×¤£¬O°j°éªº.CELLS(x,x)=RNG(X,X)ªº¤è¦¡
- Dim rng As Variant, MyArr As Variant, chars As String
-
- ' rng = [A30].CurrentRegion '°²³]UBOUND(RNG)=20 ,UBOUND(RNG,2)=10
- rng = [A30].CurrentRegion
-
- [AA1].Resize(UBound(rng), UBound(rng, 2)) = rng
- ' Q2 : ¦pªGRNG³oÓ°}¦C,§Ú§Æ±æ¥¦¥ÑRNG(2 TO 16,3 TO 5)
- chars = "A" & Chr(64 + 3 + 1) & (2 + 1) & ":" & "A" & Chr(64 + 3 + (5 - 3 + 1)) & (2 + (16 - 2 + 1))
- MyArr = ThisWorkbook.Worksheets("¤u§@ªí1").Range(chars).Value
- [AA1:AJ20].Clear
-
- [A1:J20].Clear
- [A1].Resize(15, 3) = MyArr
- End Sub
½Æ»s¥N½X |
|