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

¨C¹j¦h¤ÖÄæ´¡¤J¦h¤ÖÄæµ{¦¡¿ù»~»ÝÀ°¦£

¨C¹j¦h¤ÖÄæ´¡¤J¦h¤ÖÄæµ{¦¡¿ù»~»ÝÀ°¦£

¦³¤@­Óµ{¦¡¡@¬O§Æ±æ¥¦¯à¨C¹j¦h¤ÖÄæ´¡¤J¦h¤ÖÄæ
¦ý¦³¤@­Ó¦a¤è¤@ª½¥X²{¿ù»~ (Mark ¬õ¦â³B¡^
§Æ±æ¯à°÷À°§Ú¬Ý¤@¤U¡@ÁÂÁ¡ã
µ{¦¡¦p¤U¡G

Sub ´¡¤JÄæ()
   
    Dim BeginCol As Long, AA As Long, Temp As String, InsCol As Long
    Dim myRow As Integer, tempCol As Long
   
    myRow = Selection.Row
    BeginCol = Selection.Column
   
    Temp = InputBox("¹j´XÄæ")
   
        If IsNumeric(Temp) Then AA = CLng(Temp) Else Exit Sub
   
    Temp = InputBox("´¡¤J´XÄæ")
            
        If IsNumeric(Temp) Then InsCol = CLng(Temp) Else Exit Sub
   
    Application.ScreenUpdating = False
   
    Do While True
        tempCol = Range(Cells(myRow, 255), Cells(myRow, 255)).End(xlToLeft).Column
        If tempCol < (BeginCol + AA) Then Exit Do
        BeginCol = BeginCol + AA
        Columns(BeginCol & ":" & BeginCol + InsRow - 1).Insert Shift:=xlToRight
        BeginCol = BeginCol + InsCol
    Loop
        
    Application.ScreenUpdating = True
   
End Sub

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-9-20 15:10 ½s¿è

¦^´_ 1# Genie
Columns( BeginCol & ":" & BeginCol + InsRow - 1).Insert Shift:=xlToRight
³o¸Ì¦³¿ù»~: ³æÄæ¥i¥Î¼Æ¦r ¦p EÄæ :  5 , ¦hÄæ»Ý¥Î¤å¦r ¦p "A:D"

TOP

©Ò¥H§Ú¸Ó±q¤@¶}©lªº©w¸q´N¶}©l§ï¬O¶Ü¡H
ÁÙ¬O¥i¥H§â Columns ¥Î§Oªº°Ñ¼Æ°µ¨ú¥N©O¡H
ÁÂÁ¡ã

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2012-9-19 21:34 ½s¿è
©Ò¥H§Ú¸Ó±q¤@¶}©lªº©w¸q´N¶}©l§ï¬O¶Ü¡H
ÁÙ¬O¥i¥H§â Columns ¥Î§Oªº°Ñ¼Æ°µ¨ú¥N©O¡H
ÁÂÁ¡ã
Genie µoªí©ó 2012-9-19 17:08

·N«ä¬O¥H Columns ¨Óªí¥Ü¦h­ÓÄæ¦ì®É,
«á­±­n©ñªí¥ÜÄæ¦ì¦WºÙªº­^¤å¦r¦Ó¤£¯à©ñ¼Æ¦r, (¼Æ¦r¬Oªí¥Ü¦h¦C®É¦b¥Îªº)
¤£¹L³o­Ë¥i¥H¥Î Chr(64 + Äæ¦ì§Ç¸¹) ªº¤è¦¡¨ÓÂà´«.

Âà´««áªºµ{¦¡¥i¥H¦p¤U :

Columns(Chr(64 + BeginCol) & ":" & Chr(64 + BeginCol + InsCol - 1)).Insert Shift:=xlToRight

§Aµ{¦¡¤¤¤W¦CÀ³¬O InsCol ¦Ó«D InsRow ³á.

¥t tempCol = Range(Cells(myRow, 255), Cells(myRow, 255)).End(xlToLeft).Column
¥i¥H²¤Æ¬° :  tempCol = Cells(myRow, 255).End(xlToLeft).Column

TOP

¤£¦n·N«ä¡A´¡­Óªá
Chr(64 + BeginCol)¦bÄæ¦ì¤j©ó26®É´N¥X²{°ÝÃD¤F
­Ó¤H«Øijªº¤èªk¬O
  1. Cells(1, BeginCol).Resize(, InsCol).EntireColumn.Insert
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2012-9-19 22:14 ½s¿è

¦^´_ 5# chin15
±à...
³o­Ó°Q½×°Ï¨t²Î¦n¹³¨S¦³Ãþ¦ü "¯d¨¥" ªº¥\¯à
©Ò¥H¥u¯à¥Î¦^¤åªº¤è¦¡¨Ó¦^À³Åo.

--- ¥H¤U¬O¦^À³ªº¤º®e ---
¶â...
§A´£¨Ñªº¤è¦¡¤ñ§Úªº§¹µ½¦h¤F,
­È±o°O¤U¨Ó.

PS ­è­èµo¤F­Ó³ø§i, ¥H¬°¬O¯d¨¥¥\¯à,
¦ý¤Sµo²{¦n¹³°Q½×¦ê¬Ý¤£¨ì "³ø§i" ªº¤º®e, ©Ò¥H½ÐºÞ²zªÌ©¿²¤¸Ó³ø§i.

TOP

ÁÂÁ luhpro ©M chin15 ¸Ñ¨M¤F§Úªº°ÝÃD
¦P®É¤]¾Ç¨ì¤F·sªº¥Îªk

«D±`·PÁ¡ã

TOP

        ÀR«ä¦Û¦b : §Ñ¥\¤£§Ñ¹L¡A§Ñ«è¤£§Ñ®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD