i'm trying to read a list of information from a different sheet on excel, if the the due dates match then all the details for that person are then pasted in to the row on a new sheet.
however, i to try step through all the people on the list but say the person was 4th on the original list then the information for that person would be pasted correctly but 4 places down instead of the top (example shown in picture).
I'm not quite sure on how to fix it so each person that has matching due dates would be copied correctly in order in the right position without being overwritten.
Sub DepotsDue()
Dim i As Long
Worksheets("Depots Due Weekly").Range("A5:F150").ClearContents
For i = 1 To 150
If Worksheets("Depots Due Weekly").Cells(1, "B").Value = Worksheets("Weekly").Cells(1 + i, "E").Value Then
Worksheets("Depots Due Weekly").Cells(4 + i, "A").Value = Worksheets("Weekly").Cells(1 + i, "A").Value
Worksheets("Depots Due Weekly").Cells(4 + i, "B").Value = Worksheets("Weekly").Cells(1 + i, "B").Value
Worksheets("Depots Due Weekly").Cells(4 + i, "C").Value = Worksheets("Weekly").Cells(1 + i, "C").Value
Worksheets("Depots Due Weekly").Cells(4 + i, "D").Value = Worksheets("Weekly").Cells(1 + i, "D").Value
End If
Next i
End Sub