This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have a situation where in I need to arrange the data in order, for example a customer boards the bus from Station A to Station B called route 1, then he goes from station B to Station C and so on, however the data we have is not in sequence.
We need to find routes that are in succession. To identify the succession the customer recognized that the station he departs to in the previous route was the arriving station in his current route.
(1) Customer starts from his home and depart from bus station A (route 1)
(2) Arrives in station A and Departs to station B (route 2)
(3) Arrives in station B and Departs to Station C (route 3)
Attached is a example of how an iterative macro could be used to solve for find the next route segment each time. It could use a lot more work on things like how to handle if there isn't a "Home" to start from, or if a segment is missing. Hopefully this gets you started.
@CharlieS, I have similar problem as @benbenjoy, when having 1000 lines the logic is not working. I adjusted Append formulas to allow it to go beyond 16 lines, but the macro just keeps spinning without any output....
@benbenjoy - The example solution from above has the iterations limited to 100. Try increasing that in the Interface Designer (Ctrl+Alt+D).
@alexey_nikityuk - Even if the process doesn't finish, something should output form the macro. The macro was purpose built for the original case and may not provide a universal solution. It you debug the macro, does the first iteration complete as expected?
I recommend starting new posts here on the Community so that any advice can be tailored to your specific scenarios and desired output.