Hi,
I have a spreadsheet that adds a new column each month and I want to set up a macro to take the last column and AutoFill one column to the right when run.
Example:
This month I've got column AS populated with heading 01/09/11, I want to AutoFill AT with the heading 01/10/11, next month I want to AutoFill AU with the heading 01/11/11 from AT etc;
I've got my code adding the new column as needed, but I want not got the heading autofilling accross
NB: These columns aren't the last ones in the spreadsheet.
I have a spreadsheet that adds a new column each month and I want to set up a macro to take the last column and AutoFill one column to the right when run.
Example:
This month I've got column AS populated with heading 01/09/11, I want to AutoFill AT with the heading 01/10/11, next month I want to AutoFill AU with the heading 01/11/11 from AT etc;
I've got my code adding the new column as needed, but I want not got the heading autofilling accross
Code:
Sub Macro10()
Sheets("format").Select
Range("A1").Select
Selection.End(xlToRight).Offset(0, 1).EntireColumn.Select
Selection.Insert Shift:=xlToLeft#
End Sub
NB: These columns aren't the last ones in the spreadsheet.