Could use some guidance with limit switches and a prox switch arduino mega

More like semicolon cancer.

Good one Paul!

Is something else supposed to happen between 7 and 4? I thought you had previously stopped motor4 at the point where the proximity switch triggered; isn't motor4 still in the same position, hence the proximity switch still triggered?

Peter,
Yes, motor 4 will take it there to the prox switch. From that point motor 2 will take over and move the opposite direction. In fact, if motor 4 moves to the prox switch the first time then repeats 20 times. That would be 21 delays. When motor 2 takes over and moves it would actually be 1 move that repeats 19 delays, because motor 2 starts where motor 4 left off. If this is what you meant with the question, then you are correct....
Thank You
U_R