- ©«¤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
        
|
¦^´_ 8# myleoyes
¬O³o¼Ë¶Ü?- Sub ¶ñº¡()
- Dim E&, i&, R As Range, T%,ZZ
- Range("AB6") = ActiveCell
- E = Cells(ActiveCell.Row, 1).End(xlDown).Row
- Again:
- ZZ = Application.InputBox("½Ð¿é¤J¦C¼Æ", "½Ð¿é¤J¶ñº¡¶¡¹j¦C¼Æ", 10, Type:=2)
- If ZZ = "" Or ZZ = False Then End
- Range("AB7") = ZZ
- If ZZ <= 0 Then
- MsgBox "¦C¼Æ¶¡¹j¤£±o¤p©ó¢°¦C¡I¡I¡I", , "¦C¼Æ¿ù»~½Ð«·s¿é¤J ¡I¡I"
- GoTo Again
- End If
- Range("AB5") = 1
- Application.EnableEvents = False
- For i = ActiveCell.Row To E
- For Each R In Range("c:e,g:i,m:m").Columns
- T = IIf(i + ZZ <= E, ZZ + 1, E - i + 1)
- If Mid(R.Cells(i).Formula, 1, 1) = "=" Then
- R.Cells(i).AutoFill R.Cells(i).Resize(T)
- Else
- R.Cells(i).Offset(-1).Resize(2).AutoFill R.Cells(i).Offset(-1).Resize(T + 1)
- End If
- Next
- Cells(i, 1).Resize(, 15).Interior.ColorIndex = 34
- i = i + ZZ - 1
- Next
- Application.EnableEvents = True
- End Sub
½Æ»s¥N½X |
|