Route Optimization

BOUCHOUATA

New Member
Joined
Feb 12, 2025
Messages
2
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
Hello everyone ,

I have below data which is related to the location of some customers who will be delivred by my driver. I would like to determine the best route of delivery that my driver should follow :
Here the criteria is customer distance from my actual location , i want to write a macro that select the customer A , D , B.
Please support to proceed so.

Code ClientClientAdresseZip CodeDistance (KM) from Point AClosed By
CL1Customer ARue num 1 town2000011503:00
CL2Customer BRue num 2 town2000023003:00
CL3Customer CRue num 3 town2000035003:00
CL4Customer DRue num 3 town2000042001:00
CL5Customer ERue num 3 town2000058003:00
Best regards
Taoufik
 
Welcome to the MrExcel forum!

I don't think you even need a macro. Just sort your table by the distance column.

This really only works if the towns are in the same direction. If they are all scattered around, this becomes more difficult. This is what GPS can do. Look up "Shortest Path Problem" in Wikipedia. There are multiple algorithms to solve it, but it's doubtful that anyone here will spend the time to adapt them to an Excel macro due to the difficulty and time needed. But there are websites that will do this for you, like Mapquest.
 
Last edited:
Upvote 0
Hello Eric ,

Thank you for your support and suggestion. I will look for other resources.

Best regards
Taoufik
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top