From the following data, I need to find the total distance excluding overlapping values and gaps.
testing code.xlsx
or
ID BEGIN END TOTAL
1 12.24 13.12 0.88
2 16.24 17.31 1.07
3 21.45 22.14 0.69
4 20.6 21.46 0.86
5 16.34 18.16 1.82
6 7.9 9.47 1.57
7 0.96 2.45 1.49
8 0 0.98 0.98
9 4.01 5.37 1.36
10 22.13 23.52 1.39
11 13.08 13.86 0.78
12 9.5 10.6 1.1
13 10.52 12.26 1.74
15.73 total distance covered by each section
12.26 actual distance covered (do not know formula to get answer, but should be 12.26)
I used the END distance minus the BEGIN distance to figure out TOTAL, then took those summed to get "total miles covered by each section"
But I need to exclude overlapping distances and account for gaps to figure out "actual distance covered"
It does not have to be a formula or function, I can handle macros or VBA too.
Bookmarks