Hello Everyone,
In my worksheet I have a macro that inserts a blank column to the right of the selected column.
I want to add some code to the macro that will select the entire column added and add the text "Shift 4" into the cell in row 3
of that newly created column. If anyone has an idea that would be great.
Thanks,
B
In my worksheet I have a macro that inserts a blank column to the right of the selected column.
I want to add some code to the macro that will select the entire column added and add the text "Shift 4" into the cell in row 3
of that newly created column. If anyone has an idea that would be great.
Thanks,
B
VBA Code:
Option Explicit
Sub InsertColumn()
With Selection.EntireColumn.Offset(0, 1)
.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromRightOrBelow
.Offset(0, -1).Cells(6, 1).Resize(3, 1).FillRight
End With
End Sub