Hello,
I have an issue that for now I only know how to do it manually and I need help with a macro that can do it automatic
I managed to record a macro, but each time I run the macros that are calculating the sheets (Distances / Solution) it won't work anymore because each time I have a new solution which will not match with the macro that I already recorded.
What I want to do is this:
1. Unhide only the necessary columns based on how many vehicles are used in sheet 5.Solution.
For example, if 5 vehicles are used from 20 vehicles, I need the unhide columns A / B / C / D / E from "Destination Sheet"
2. Copy the corresponding city names present in sheet 1.Locations for each of the routes without the Depot (which is present at the start and end of each route)
For example, if route 1 has the following route: Depot - Customer 2 - Customer 4 - Depot, then I will have in column A the following names: Destination B / Destination D
Customer 2 = Destination B*
Customer 4 = Destination D*
*Names can be found in the Locations sheet
3.Copy the total distance for each truck and post it in the respective cell in "Destinations Sheet"
For example: Truck 1 - total distance 571.98 (Cell F9) will be copied in cell N3 because it's the first route
4. Delete all the sheets - VRP Solver / 1.Locations / 2.Distances / 3.vehicles / 4.Solution (if it can be done in "silence" without prompting me each time to press Ok)
Can anyone help me with this?
Bookmarks