Results 1 to 3 of 3

Thread: Script to detect overlapping values based on two variables

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Dec 2016
    Posts
    22
    Location

    Script to detect overlapping values based on two variables

    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
    Attached Files Attached Files
    Last edited by enjam; 12-10-2021 at 01:40 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •