Hi Dan,
Thanks for your reply, the reason I was opting for Autofill is I'm looking to change the cell reference. There's a monthly figures been shown on a summary page from umpteen worksheets so the cell references allow it to show figures from the relevant month.
I've now got the AutoFill to work for one row but I couldn't get it to work for multiple rows, so using your last row feature I've managed to achieve that.
Here's my code, it looks pretty busy it works haha.
Sub NewMonth()
If MsgBox("This add a new month to the sheet", vbYesNo) = vbNo Then Exit Sub
Dim NewC As Long
Dim LastC As Long
Dim LastR As Long
'find last column
LastC = Cells(5, Columns.Count).End(xlToLeft).Column
LastR = Cells(Rows.Count, LastC).End(xlUp).Row
'label the new column
NewC = Cells(5, Columns.Count).End(xlToLeft).Column + 1
'create new column
Columns(NewC).Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFillDefault
'copies the row across
Dim cellSource As Range
Dim cellTarget As Range
Set cellSource = Range(Cells(5, LastC), Cells(LastR, LastC))
Set cellTarget = Range(Cells(5, LastC), Cells(LastR, LastC + 1))
cellSource.AutoFill Destination:=cellTarget, Type:=xlFillDefault
End Sub
Thanks again for your help
Tom
Bookmarks