I am working on a code, wherein i need to copy specific row from another sheet and need to paste into row which is next to last filled row but paste as values.
highlighted line is showing error.
A = Worksheets("PROJECT_DETAILS").Cells(Rows.Count, 1).End(xlUp).Row
For Z = 4 To A
s = Worksheets("PROJECT_DETAILS").Cells(Z, 1).Value
Sheets(s).Select
A = Worksheets(s).Cells(Rows.Count, 1).End(xlUp).Row
For i = 5 To A
c = Worksheets("TASK_DETAILS_MAIN").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets(s).Rows(i).Copy
Worksheets("TASK_DETAILS_MAIN").Select
Worksheets("TASK_DETAILS_MAIN").Cells(c + 1, 1).Select
ActiveSheet.PasteSpecial xlPasteValues
Columns("A:I").Select
Selection.EntireColumn.AutoFit
Next i
Next Z
Worksheets("TASK_DETAILS_MAIN").Select
Bookmarks