1
我有以下的宏,並希望減少行數,以加快進程。偏移相比Selection.Insert Shift = xlToRight
5
ActiveCell.Columns("A:A").EntireColumn.Select
If Selection.Find(What:="*", After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=True) Is Nothing Then
GoTo 6
End If
Selection.Find(What:="*", After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=True).Activate
ActiveCell.Select
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
GoTo 5
我想替換倍數「Selection.Insert換檔:= xlToRight」線路用單線使用偏移。
您能否請幫助!
這是完美的。 範圍(Selection,Selection.Offset(0,4))。插入移位:= xlToRight 是我的宏的正確代碼。非常感謝你。 –
我很高興它幫助你。你能否將答案標記爲已接受,以便其他人知道問題已得到解答?謝謝。 – hstay