# Solve the Travelling Salesman Problem in Excel | Multi-Stop Route Optimizer Template

## Метаданные

- **Канал:** Coding Is Fun
- **YouTube:** https://www.youtube.com/watch?v=T0D4fQ5PLsI

## Содержание

### [0:00](https://www.youtube.com/watch?v=T0D4fQ5PLsI) Segment 1 (00:00 - 03:00)

In this video I will show you how to solve the traveling salesperson problem. That means you have a list of places you want to visit. You start at one location, visit every place once and then return to the start or finish at another address. Now the question is, what is the shortest possible route that covers all stops one time? And that is exactly what this Excel template calculates for you. So to get started, all you need to do is to enter your start and end address. Now the end address can be, of course, the same as your starting point. But for this example, let's say you want to finish a route at a different location. Next you just need to paste in all the stops you want to make along the way. Once that is done, all you really got to do is to press one button. And within seconds you will get back to the optimal route. So here you will see your start and end address, the best order of your stops and also how far each location is from the next plus the travel time. Now this is all based on live traffic data from Google Maps. And if you want, you can also view your route directly on Google Maps by clicking on this button here. So here you can now see your full route. And if you want, you can also send it straight to your smartphone and use it for navigation. Or if you prefer, you can also save the route as a PDF file. So for that, back in Excel, just click on this button here. And once the PDF is saved, it will open automatically. So that can be super handy if you want to print it out. Now you might have noticed already that the tool works with all kinds of address formats. So it can be either a full or partial address, a building name, a landmark or even geo coordinates. That doesn't really matter. And if you head over to the settings tab, you will see a few options you can tweak. For example, you can switch your units from miles to kilometers or change the travel mode like driving, walking, biking or using a two-wheeler. You can also choose how you want the travel time to be shown. So either just in minutes, in hours or both. And lastly, you can decide whether or not you want to include the current traffic conditions. So once you've adjusted your settings, you can return to the route tab. And by the way, I should also mention that this tool works with addresses from all over the world, even across different countries. So as I said earlier, just enter your start and end address and below that, all the locations you want to visit. In this case, for example, the start and end location are the same. And when I calculate the route, you will now see it shown in kilometers. Now to find the optimal route, the tool uses Google Maps under the hood. For that to work, you will need the Google Maps API key. Getting the key is free and it only takes a couple of minutes. With that key, Google gives you 10,000 route calculations per month completely for free. And if you go over that limit, they will charge you $5 for every additional 1000 calculations. And just to be clear here, each time you press the optimize route button, that counts as one route calculation. So in this demo video, we've only used two calculations so far. Now and the Excel template itself is a one-time purchase. So you buy it once and you can use it forever. No subscription needed. After you make your purchase, you will get a welcome email with the Excel file, your license key and a link to the getting started video. In that video, I will show you step by step how to set everything up. Okay, and one last thing. The template works with pretty much any version of Excel on Windows or Mac OS, including Excel 365. The oldest version it supports is Excel 2007. So if you've got anything in between, you're good to go. You just want to make sure to use the desktop version of Excel because the web version isn't supported. Now, the only current limitation is that the tool supports up to 25 waypoints. That means 25 locations between your start and end point. That is just a limit from Google Maps. All right, so I hope you find the template useful. And if you've got any questions, just drop them in the comments below. Thanks for watching and I will see you in the next video.

---
*Источник: https://ekstraktznaniy.ru/video/44557*