- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 3# benny15151515
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim Rng(1 To 2) As Range, xT As Integer, xEnd As Integer
- Set Rng(1) = Sheets("©ú²Óªí").Range("A1:O38") '²Ä¤@±i©ú²Óªí½d³ò
- xT = 5: xEnd = xT + 30 '©ú²Óªí¸ê®Æ ªº°_©l¦C¸¹,µ²§ô¦C¸¹
- Rng(1).Rows(xT & ":" & xEnd) = "" '²M°£©ú²Óªíªº¸ê®Æ
- Sheets("©ú²Óªí").Rows(Rng(1).Offset(Rng(1).Rows.Count).Row & ":" & Rows.Count).Clear
- '²M°£¤W¦¸¾l¯dªº©ú²Óªí(¯d¤U²Ä¤@±i)
- Set Rng(2) = Sheets("¸ê®Æ").Range("a2").EntireRow '²Ä¤@µ§¸ê®Æ
- Do '¶]¸ê®Æªº°j°é
- Rng(1).Cells(xT, 1).EntireRow = Rng(2).Value 'xT¦C¤W,¶K¤W¸ê®Æ
- xT = xT + 1 'xT¦C + 1
- Set Rng(2) = Rng(2).Offset(1) 'Offset(1)¤U¤@µ§¸ê®Æ
- If Rng(2).Cells(1) = "" Then Exit Do '¨S¦³¸ê®ÆÂ÷¶},¶]¸ê®Æªº°j°é
- If xT = xEnd Then '¶ñº¡©ú²Óªí
- With Rng(1).Offset(Rng(1).Rows.Count) 'Rng(1).Rows.Count: ©ú²ÓªíªºÁ`¦C¼Æ
- Rng(1).Copy .Cells '½Æ»s ©ú²Óªí
- Set Rng(1) = Rng(1).Offset(Rng(1).Rows.Count) ' Set : «ü©wª«¥ó¤Þ¥Îµ¹ÅܼƩÎÄÝ©Ê
- End With
- xT = 5 '«³]©ú²Óªí¸ê®Æ ªº°_©l¦C¸¹
- Rng(1).Rows(xT & ":" & xEnd) = "" '²M°£©ú²Óªíªº¸ê®Æ
- End If
- Loop
- End Sub
½Æ»s¥N½X |
|