Consulting

Results 1 to 7 of 7

Thread: Solution to find overlapping rectangles given co-ordinates

  1. #1

    Solution to find overlapping rectangles given co-ordinates

    Hello Forum

    I have the following problem:

    I need to find which pairs of rectangles overlap (when plotted on an axis) where I'm given the four corners
    as X and Y co-ordinates.

    For example:
    Rectangle A) X(1,3) Y(2,4)
    Rectangle B) X(3,5) Y(4,6)
    Rectangle C) X(5,7) Y(7,9)
    Rectangle D) X(6,8) Y(8,10)

    For these 4 rectangles the following rectangles overlap; A&B and C&D

    What I'm looking for is an automated method that given the X and Y co-ordinates can give all pairings
    of overlapping rectangles for a long list of rectangles (given as the co-ordinates of the 4 corners).

    I have attached a sample excel file that gives a visual representation and a list of the rectangles this is needed for.

    If someone could find a way to do this or even articulate a possible method for solving the problem then this would be greatly appreciated.

    Attachment 10447
    Attached Files Attached Files
    Last edited by deusextra; 08-15-2013 at 05:03 AM.

  2. #2
    In G3:

    =AND(B3<=D2;C3<=E2)

    Fill down in column G

  3. #3
    Thanks snb, although I get a #Value error for all entries when I do that?

    Would you be able to do it on the Excel sample file if you are not getting the #Value errors?

    Also please see updated Excel sample file which gives a clearer indication of the desired output.

    Thanks again.
    Last edited by deusextra; 08-15-2013 at 05:17 AM.

  4. #4
    see the attachment
    Attached Files Attached Files

  5. #5
    Thanks snb. This is not quite what I was looking for though. Does anybody else have any ideas? This would be massively appreciated!

  6. #6
    Your feedback is hardly worth mentioning it as such.

  7. #7
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

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