Thank you for contacting www.vietnamvisa-easy.com,
If your flights are on the same airline or partner airlines, your luggeage will get transferred from the first to the second one for you. In this case, you do not need to go through immgration or customs, then no visa is required.
Otherwise, if your flight are on the two different airlines and not partner airlines, you will have to go through immigration or customs to collect and re-check your luggage no matter where you are going on your second airline. If it is the case, you are required a visa for Vietnam eventhough you are not enter the country or even leaving the airport.
We hope the information is clear and helpful for you.