enjam
12-10-2021, 01:08 AM
Hi all,
I'm trying to develop a function that detects overlapping values based on two variables:
(1) shift start and end time, and
(2) start chainage and end chainage (i.e. distance from a particular location).
My initial approach was to try and make rectangles (with shift start and end times defining the length of the rectangle and the chainages defining the height), then looking for overlaps in the rectangles drawn using a VBA script. Unfortunately the shapes ended up far too small for overlaps to be detected.
Attached is what I'm trying to achieve, a macro that looks at overlaps between start and finish times, then also checks for overlaps in chainage, and creates an error message where an overlap is detected.
Any guidance would be greatly appreciated.
Thank you,
enjam
I'm trying to develop a function that detects overlapping values based on two variables:
(1) shift start and end time, and
(2) start chainage and end chainage (i.e. distance from a particular location).
My initial approach was to try and make rectangles (with shift start and end times defining the length of the rectangle and the chainages defining the height), then looking for overlaps in the rectangles drawn using a VBA script. Unfortunately the shapes ended up far too small for overlaps to be detected.
Attached is what I'm trying to achieve, a macro that looks at overlaps between start and finish times, then also checks for overlaps in chainage, and creates an error message where an overlap is detected.
Any guidance would be greatly appreciated.
Thank you,
enjam