Chelonian4
New Member
- Joined
- Jan 20, 2014
- Messages
- 7
I have a spreadsheet that has for several different objects the location of their left edge, right edge, top, and bottom relative to a point in the top left corner. I want to make a condition for formatting the cell containing the object as red whenever one of the areas it creates overlaps any of the other areas.For instance, if:
Object 1:
Left Edge: 2
Right Edge: 6
Top: 1
Bottom: 4
Object 2
Left Edge: 0
Right Edge: 2
Top: 10
Bottom: 12
Object 3:
Left Edge: 3
Right Edge: 8
Top: 5
Bottom: 8
Then Object 1 and Object 3 would light up red, since they overlap, but Object 2 would remain unlit, since it doesn't overlap anything else anywhere. I have made a program that successfully does this by OR-ing a long list of AND statements (three AND statements for every edge of every object) for each Object, but this is very messy, time-consuming, prone to errors, and is completely impractical for more than 4 objects. Is there a better way? If anyone could help me, I would greatly appreciate it.
Object 1:
Left Edge: 2
Right Edge: 6
Top: 1
Bottom: 4
Object 2
Left Edge: 0
Right Edge: 2
Top: 10
Bottom: 12
Object 3:
Left Edge: 3
Right Edge: 8
Top: 5
Bottom: 8
Then Object 1 and Object 3 would light up red, since they overlap, but Object 2 would remain unlit, since it doesn't overlap anything else anywhere. I have made a program that successfully does this by OR-ing a long list of AND statements (three AND statements for every edge of every object) for each Object, but this is very messy, time-consuming, prone to errors, and is completely impractical for more than 4 objects. Is there a better way? If anyone could help me, I would greatly appreciate it.