Trying to copy specific columns in a row to another excel sheet based on it meeting certain criteria.
Never done this before and have tried to copy what others have done but keeps telling me error.
YouTube tutorials
Private Sub CommandButton1_Click()
a = Worksheets("Salesman Quotes Active").Cells(Rows.Count, 1).End(xlUp).Row
For i = 3 To 65
If Worksheets("Salesman Quotes Active").Cells(i, 10).Value = "Warm 2020" Then Worksheets("Salesman Quotes Active").Range(Cells(i, 1), Cells(i, 2), Cells(i, 8), Cells(i, 10)).Copy
Worksheets("2020 Monetary vs Date anlalysis").Activate
b = Worksheets("Salesman Quotes Active").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("2020 Monetary vs Date analysis").Cells(b + 1, 1).Select
ActiveSheet.Paste
Worksheets("Salesman Quotes Active").Activate
Next
Application.CutCopyMode = False
ThisWorkbook.Worksheets("Salesmans Quotes Active").Cells(1, 1).Select
End Sub
Runtime error "450"