Hi! I am a new user with Excel Macros and VBA. I need to copy some data from one main worksheet into individual worksheets based on the value set in one of the columns. Here is the code I am currently using. The code does not run and stops at the line "Worksheets("Sheet 1").Range("Cells(i,1)").Offset(0, 7).Selection.Copy" Please help me.
Worksheets.Add().Name = " Anterior"
For i = 5 To Last_Row + 3
If Worksheets("Sheet 1").Cells(i, 2).Value = "Anterior" Then
Worksheets("Sheet 1").Range("Cells(i,1)").Offset(0, 7).Selection.Copy
Worksheets("Anterior").Range("Cells(i,2)").Paste
End If
Next i
Worksheets.Add().Name = " Anterior"
For i = 5 To Last_Row + 3
If Worksheets("Sheet 1").Cells(i, 2).Value = "Anterior" Then
Worksheets("Sheet 1").Range("Cells(i,1)").Offset(0, 7).Selection.Copy
Worksheets("Anterior").Range("Cells(i,2)").Paste
End If
Next i