1
votes

enter image description here

Hello Guys! I have a problem that I need to solve using VBA. This is What I need to do:

I have a Range of Continuous chainage (Distance) at the interval of 20 meters and at each interval, there is a Road Side Drain (It may be at either side, or Both Sides or No drains at all in any side). All I need to do is just Sort those chainages for me (as shown in the picture attached). The endpoints may be variable. Might even reach more than 1000 rows of data.

Example: If We look at chainage 0-60, We have Drain at both sides, and so in "Expected Result" section, I have written 0-70 (70 is written because it is midpoint of 60 and 80). 80 is where our drain arrangement starts to shift from "Drain at both sides" to "No drain at either side")

The process continues till the end of the data.

I need to solve using VBA Nice. Welcome to SO. Please, post the code you have tried, where are you stuck and what erros you get. Notice this is not a free coding service. read How much research effort is expected of Stack Overflow users?Foxfire And Burns And Burns