Hi all, I'm getting the error 1004 whilst running this macro. It was working fine earlier, any advice would be much appreciated.
Sub DateFormat()
' converts dates from dd.mm.yy format to dd/mm/yy format
Dim LastRow As Integer
jLastRow = Sheets("Data").UsedRange.Rows.Count
Columns("J:J").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("J1").Select
ActiveCell.FormulaR1C1 = "=REPLACE(RC[-1],3,1,""/"")"
Selection.AutoFill Destination:=Range(Cells(1, 10), Cells(jLastRow, 10))
Range("K1").Select
ActiveCell.FormulaR1C1 = "=REPLACE(RC[-1],6,1,""/"")"
Selection.AutoFill Destination:=Range(Cells(1, 11), Cells(jLastRow, 11))
Call GetDays
End Sub
The error occurs on the line: "Selection.AutoFill Destination:=Range(Cells(1, 10), Cells(jLastRow, 10))"
Thanks,
Matt
Bookmarks