I have ran into this problem a few times and still don't understand why it happens. When I use For Each x then later say Next, it comes back with an error saying invalid use of Next. Could someone help me and explain how to use Next so I can stop running into this problem?

    For Each c In Range("R3", Cells(Rows.Count, "R").End(xlUp))
    For Each d In Range("T3", Cells(Rows.Count, "T").End(xlUp))
    For Each x In Range("U3", Cells(Rows.Count, "U").End(xlUp))
    If d = "" Then
    Exit Sub
    Else:
        c.Offset(0, 1).Formula = path3 & c.Value & "\" & c.Value & " Pickup Tool " & d.Value & ".xlsm"
     e = FileDateTime(x)
     x.Offset(0, 1) = e
     Next d, c, x

     End If