Car cranks well but will not start. Also it keeps cranking until I turn the switch off.
It keeps cranking because the computer is actually what is controlling the startup. You turning the key off stops it.
It could be a number of things preventing it from starting. It needs to be diagnosed rather than just throwing parts at it. If you are doing the work yourself, was the check engine light on before this happened? And whatnwere the error codes?
If you can’t answer this question, have it towed to a shop. Be prepared to pay for diagnostic time.