Redefinition of void setup

It makes your code easier to read and understand.

I think you need to write a forward() function, add a switch for the reversing microswitch, use the methods from StateChangeDetection tutorial to set a forward/reverse flag:

...and change the logic of your for loop to deal with going either direction.

What is supposed to happen if you set it for 10 turns and it hits the reversing microswitch at 5.5 turns? Stop in the middle of a reverse(200) comand and move forward 5.5 turns?

I'd re-write the whole thing to translate the 'j' number of turns into targetSteps=j*200 and use a state machine and a stepper library with acceleration.